with Edge-Speciﬁed Reductions

. Various versions of binary decision diagrams (BDDs) have been proposed in the past, diﬀering in the reduction rule needed to give meaning to edges skipping levels. The most widely adopted, fully-reduced BDDs and zero-suppressed BDDs, excel at encoding diﬀerent types of boolean functions (if the function contains subfunctions independent of one or more underlying variables, or it tends to have value zero when one of its arguments is nonzero, respectively). Recently, new classes of BDDs have been proposed that, at the cost of some additional complexity and larger memory requirements per node, exploit both cases. We introduce a new type of BDD that we believe is conceptually simpler, has small memory requirements in terms of node size, tends to result in fewer nodes, and can easily be further extended with additional reduction rules. We present a formal deﬁnition, prove canonicity, and provide experimental results to support our eﬃciency claims.


Introduction
Decision diagrams (DDs) have been widely adopted for a variety of applications. This is due to their often compact, graph-based representations of functions over boolean variables, along with operations to manipulate those boolean functions based on the sizes of the graph representations, rather than the size of the domain of the function. Most DD types are canonical for boolean functions: for a fixed ordering of the function variables, each function has a unique (modulo graph isomorphism) DD representation, or encoding.
Compactness, and canonicity, is achieved through careful rules for eliminating nodes. All canonical DDs eliminate nodes that duplicate information: if nodes p and q encode the same function, one of them is discarded. Additional compactness comes from a reduction rule (or rules) that specifies both how to interpret "long" edges that skip over function variables, and how to eliminate nodes and replace them with long edges. Two popular forms of decision diagrams, Binary Decision Diagrams (BDDs) [1] and Zero-suppressed binary Decision Diagrams (ZDDs) [8], use different reduction rules. Some applications are more suitable for BDDs while others are more suitable for ZDDs, depending on which of the two reductions can be applied to a greater number of nodes. Unfortunately, it is not always easy to know, a priori, which reduction rule is best for a particular application. Worse, there are applications where both rules are useful.

Related Decision Diagrams
We focus on various types of DDs that have been proposed to efficiently encode boolean functions of boolean variables, and briefly recall DDs relevant to our work. For consistency in notation, all DD types we present encode functions of the form f : B L → B and have L levels, with level L at the top.
The first and most widely-known type is the reduced-ordered binary decision diagrams (BDDs) [1]. A BDD is a directed acyclic graph where the two terminal nodes 0 and 1 are at level 0, we write lvl (0) = lvl (1) = 0, while each nonterminal node p belongs to a level lvl (p) ∈ {1, ..., L} and has two outgoing edges, p [0] and p [1], pointing to nodes at lower levels (this is the "ordered" property). The "reduced" property instead forbids both duplicate nodes (p and q are duplicates if lvl (p) = lvl (q), p[0] = q[0], and p [1] = q [1]), and redundant nodes (p is redundant if p[0] = p [1]). The function F p encoded by BDD node p is defined as where (x 1:L ) is a shorthand for the boolean tuple (x 1 , ..., x L ). Another widely-used type is the zero-suppressed binary decision diagrams (ZDDs) [8], which differ from BDDs only in that they forbid high-zero nodes (node p is high-zero if p [1] = 0) instead of redundant nodes. The function encoded by ZDD node p is defined with respect to a level n ≥ m = lvl (p), as Both BDDs and ZDDs are canonical : any function f : B L → B has a unique node p encoding it, an essential property guaranteeing time efficiency. Just as important is their memory efficiency, i.e., the number of nodes required to encode a given function. In this respect, BDDs and ZDDs are particularly suited to different situations. BDDs require fewer nodes if there are many "don't cares", i.e., it often happens that F p (x 1:L ) = F p (y 1:L ) when x 1:L and y 1:L differ in one position, as this corresponds to redundant nodes, not stored in BDDs. ZDDs require fewer nodes if the function tends to have value 0 when many arguments have value 1 as this corresponds to high-zero nodes, not stored in ZDDs.
Quasi-reduced BDDs (QBDDs) [5] are also canonical: they are just like BDDs (or ZDDs) except they only forbid duplicate nodes. QBDD edges connect nodes on adjacent levels. Since edges are not allowed to skip levels, nodes do not need to store level information, and redundant and high-zero nodes cannot be eliminated. A useful variation is to eliminate only redundant (or high-zero) nodes whose children are 0, and thus allow long edges directly to 0. In either case, QBDDs require at least as many nodes as BDDs and ZDDs to encode a given function, so they provide an upper bound on both the BDD and the ZDD sizes.
Various decision diagrams have been proposed to combine the characteristics of BDDs and ZDDs and exploit the reduction potential of both. Tagged binary decision diagrams (TBDDs) [10] associate a level tag to each edge. BDD reductions are implied along the edge from the level of the node to the level of the tag, and ZDD reductions are implied from the level of the tag to the level of the node pointed to by the edge. Alternatively, TBDDs can apply reductions in the reverse order along an edge: ZDD reductions first and BDD reductions second. Either reduction order can be used in TBDDs, but a TBDD can only use one of them, i.e., they cannot both be used in the same TBDD.
Chain-reduced BDDs (CBDDs) and chain-reduced ZDDs (CZDDs) [2] augment BDDs and ZDDs by using nodes to encode chains of high-zero nodes and redundant nodes, respectively. Each node specifies two levels, the first level indicating where the chain starts (similar to the level of an ordinary BDD or ZDD node), and the second, additional, level indicating where the chain ends.
Finally, ordered Kronecker functional decision diagrams [3] allow multiple decomposition types (Shannon, positive Davio, and negative Davio), enabling both BDD and ZDD reductions. However, each level has a fixed decomposition type, thus this approach is less flexible, potentially less efficient, and hindered by the need to know which decomposition will perform best for each level.

ESRBDDs
Definition 1. An L-level (ordered) edge-specified reduction binary decision diagram (ESRBDD) is a directed acyclic graph where the two terminal nodes 0 and 1 are at level 0, lvl (0) = lvl (1) = 0, while each nonterminal node p belongs to a level lvl (p) ∈ {1, ..., L} and has two outgoing edges, p[0] and p [1], pointing to nodes at lower levels. An edge is a pair e = e.rule,e.node , where e.rule is a reduction rule in {S, L 0 , H 0 , X} and e.node is the node to which edge e points. The reduction rule on an edge specifies its meaning when skipping levels, thus it is just S for short edges while, for long edges, the rules H 0 , L 0 , and X correspond to the "zero-suppressed" rule of [8], the "one-suppressed" rule (a new rule analogous to the zero-suppressed, as we shall see), and the "fully-reduced" rule of [1], respectively. To make this more precise, we recursively define the boolean function F n κ,p : B n → B encoded by an ESRBDD edge κ,p with respect to a level n ∈ {0, ..., L}, subject to lvl (p) ≤ n, as where the if-then-else operator (x n )?f 1 :f 0 is a shorthand for (¬x n ∧f 0 )∨(x n ∧f 1 ). We defined an ESRBDD as a directed acyclic graph, so it can potentially have multiple roots (nodes with no incoming edges). However, since our focus is on the size of the DD encoding a given function, we assume from now on that our ESRBDDs have a single root node p , pointed to by a dangling edge with rule κ . We denote the set of all nodes reachable from p (and therefore all nodes in the ESRBDD) as Nodes(p ). The dangling edge κ ,p encodes the function F L κ ,p , which is independent of κ only if lvl (p ) = L, in which case we require κ = S, while we require κ ∈ {L 0 , H 0 , X} if lvl (p ) < L. Finally, we will informally say "ESRBDD κ ,p " to refer to the entire graph below (and including) dangling edge κ ,p .
Note that BDDs [1] can be viewed as ESRBDDs where the edge labels are restricted to {S, X}, and a reduced BDD corresponds to an ESRBDD with no duplicate nodes and no redundant nodes. Similarly, ZDDs [8] can be viewed as ESRBDDs where edge labels are restricted to {S, H 0 }, and a reduced ZDD corresponds to an ESRBDD with no duplicate nodes and no high-zero nodes. Also, we note that there is no corresponding definition in the existing literature for the version of ESRBDDs where the edge labels are restricted to {S, L 0 }.    The last restriction disallows edges H 0 ,0 and L 0 ,0 in the reduced ESRBDD. This is because F n H0,0 ≡ F n L0,0 ≡ F n X,0 ≡ 0, and since we want to enforce canonicity in the reduced ESRBDD, we have arbitrarily chosen X,0 as the unique representation for such long edges.

Reducing an ESRBDD
An ESRBDD can be converted into a reduced ESRBDD using Algorithm 1. The algorithm first replaces any edges H 0 ,0 or L 0 ,0 with X,0 , to satisfy restriction R5. Then, it repeatedly chooses a high-zero, low-zero, redundant, or duplicate node q and eliminates it. If node q duplicates node p, then it redirects all incoming edges from q to p (line 7). Otherwise, q is a high-zero, low-zero, or redundant node, and lines 9-14 find a node d with lvl (d ) < lvl (q) = n − 1, and a rule κ ∈ {X, H 0 , L 0 } such that F n S,q (x 1:n ) = F n κ ,d (x 1:n ). Note that a short edge to node q becomes a long edge to node d because lvl (d ) < lvl (q). For the special case of d = 0, any edge to q is equivalent to edge X,0 , so the algorithm replaces those edges (line 16).
When d = 0, we have F n S,q (x 1:n ) = F n κ ,d (x 1:n ) for n = lvl (q) + 1, and these edges are replaced in line 18. It follows that F n κ ,q (x 1:n ) = F n κ ,d (x 1:n ) for n > lvl (q)+1; these replacements are made in line 19. For rules κ ∈ {X, H 0 , L 0 } Algorithm 1. Reduce an ESRBDD 1: procedure Reduce(ESRBDD κ ,p ) 2: V ← Nodes(p ); 3: ∀κ ∈ {H0, L0}, replace all κ,0 edges with X,0 ; 4: while V contains a high-zero, low-zero, redundant, or duplicate node do 5: Choose a high-zero, low-zero, redundant, or duplicate node q ∈ V ; 6: if q duplicates p then 7: ∀κ ∈ {S, X, H0, L0}, replace all κ,q edges with κ,p ; 8: else 9: if q is a redundant node then 10: κ ← X; d ← q [1].node; 11: else if q is a high-zero node then 12: Create node q at level lvl (q) + 1 and add q to V ; 22: if κ = X then 23: Replace all κ,q edges with κ,q or S,q ; 29: Remove q from V ; with κ = κ , we cannot replace κ,q with a single long edge to node d , because the edge needs different reduction rules: the κ rule is needed above level lvl (q), and the κ rule is needed from level lvl (q) down. So lines 21-27 of the algorithm create a new node q at level lvl (q) + 1, of the appropriate shape such that F n κ,q (x 1:n ) = F n S,q (x 1:n ) for n = lvl (q ) + 1. It then follows that F n κ,q (x 1:n ) = F n κ,q (x 1:n ) for n > lvl (q ) + 1. These replacements are made in line 28, where the replacement κ,q is used for long edges, and S,q is used for short edges.
In the above discussion, any edge that is replaced by the algorithm encodes the same function as its replacement, giving us the following lemma. Lemma 1. In Algorithm 1, each edge replacement preserves the function encoded by the ESRBDD κ ,p .
It remains to show that the algorithm always terminates.

Lemma 2. Algorithm 1 terminates in O(|Nodes(p )|) steps.
Proof: The proof is based on the observation that, at every iteration of the algorithm, a node q is chosen to be processed (line 5), at most two nodes are created at level lvl (q) + 1 (line 21), and node q is removed (line 29). These new nodes (q on line 21), by construction, satisfy one of the following patterns: These nodes are neither redundant, high-zero, nor low-zero, but they could be duplicates. Since the elimination of duplicate nodes (line 7) does not create new nodes, the two nodes created at lvl (q) + 1 result in at most two additional iterations of the algorithm. Therefore, for every node in the original ESRBDD, the algorithm iterates at most three times.
Proof: Lemma 2 establishes that Algorithm 1 terminates in O(|Nodes(p )|) steps. Based on the condition of the while loop, when the loop terminates, we know that the ESRBDD contains no high-zero, low-zero, redundant, or duplicate nodes. From line 3 and the fact that the algorithm never adds an edge of the form H 0 ,0 or L 0 ,0 , we conclude that when Algorithm 1 terminates, any edge to terminal node 0 must have edge rule S or X. Therefore, when the Algorithm terminates, the ESRBDD is reduced. Lemma 1 establishes that Algorithm 1 produces an equivalent (in terms of encoded function) ESRBDD.
While we have established that Algorithm 1 always terminates and produces a reduced ESRBDD, we have not yet established that the Algorithm produces the same reduced ESRBDD, regardless of the order in which nodes are chosen in line 5. This is guaranteed by the canonicity property, discussed next. Additionally, we note here that, unlike most other decision diagrams (including BDDs, ZDDs, CBDDs, CZDDs, and TDDs), a reduced ESRBDD is not necessarily a minimum size ESRBDD encoding of a function, even for a fixed variable order, as elimination of some node q during the reduction could trigger the creation of two new nodes. An example of this is shown in Fig. 3, where redundant node q is eliminated. Edges S,q and X,q can be simply redirected as X,p , but the H 0 ,q and L 0 ,q edges require the creation of two new nodes q H0 and q L0 .
While the "chaotic" non-deterministic reduction procedure in Algorithm 1 is handy in proving termination under the most general conditions, in practice we utilize a deterministic depth-first version of this algorithm that reduces a node only after having reduced its children.

Canonicity of Reduced ESRBDDs
We are now ready to discuss the canonicity of reduced ESRBDDs, i.e., to show that a function has a unique encoding as a reduced ESRBDD. In the following, we say that functions F n κ,p and F n κ ,p are equivalent, written F n κ,p ≡ F n κ ,p , if F n κ,p (x 1:n ) = F n κ ,p (x 1:n ) for all possible inputs (x 1:n ) ∈ B n .   [1]. We therefore have either that p = p and the theorem holds, or that p duplicates p , which is impossible because of restriction R1. Next, suppose lvl (p) < n and lvl (p ) < n. If κ = κ , then in all cases for F we conclude that F n−1 κ,p ≡ F n−1 κ ,p and by inductive hypothesis we have that p = p , so the theorem holds. We now show that κ = κ is impossible, by contradiction. Consider the possible cases for κ = κ : In all cases, we conclude that F n−1 κ,p ≡ 0 and F n−1 κ ,p ≡ 0. By the inductive hypothesis, we have that p = 0 and p = 0. According to R5, if p = 0 then κ cannot be L 0 or H 0 . But this implies κ = X and κ = X, contradicting our assumption that κ = κ .
Finally, suppose lvl (p) = n and lvl (p ) < n (the case lvl (p) < n and lvl (p ) = n is symmetric). We show that this is impossible, by contradiction. Consider the possible cases for κ : .node = 0 and p [1].node = p . If lvl (p ) = n − 1, then we have p[1] = S,p ; otherwise, we have lvl (p ) < n − 1 and by inductive hypothesis, p [1] = κ ,p = L 0 ,p . Either way, node p is low-zero, and from R4 we have a contradiction.
The canonicity result establishes that, regardless of how a ESRBDD is constructed for a given function, the resulting reduced ESRBDD is guaranteed to be unique (assuming a given variable order). Thus, we can determine in constant time whether two functions encoded as reduced ESRBDDs are equivalent (as is already the case for reduced ordered BDDs and ZDDs). From now on, unless otherwise specified, we assume that all ESRBDDs are reduced.

Comparing ESRBDDs to Other Types of Decision Diagrams
For the remainder of the paper, we consider the relative size of the different types of DD based on the interpretation of long edges, namely, BDDs, ZDDs, CBDDs, CZDDs, TBDDs, and ESRBDDs. We also consider ESRBDDs without the L 0 edge label, denoted ESRBDD−L 0 . These are summarized in Table 1, some entries (comparisons between BDDs, ZDDs, CBDDs, and CZDDs) are known from prior work [2,6], some entries are discussed below, and some entries are unknown. Entry [T 1 , T 2 ] describes the worst-case increase in the number of nodes, as a multiplicative factor, More formally, it is the bound for "number of nodes required to encode f using T 2 " divided by "number of nodes required to encode f using T 1 " for all functions f over L boolean variables. Note that the node counts always include both terminal nodes. A factor of 1 indicates that type T 1 cannot require fewer nodes than type T 2 .
First, we discuss how an arbitrary BDD can be converted into a TBDD or ESRBDD, and fill in the BDD row in Table 1. To build a TBDD from a BDD, every edge to a non-terminal node p in the BDD is annotated with the level tag lvl (p). By definition, any such annotated edge in a TBDD implies BDD reductions for the skipped levels. A TBDD thus constructed is no larger than the BDD, and may be further reduced (since it could contain high-zero nodes) by applying the TBDD reduction described in [10]. Similarly, we can annotate long edges in the BDD with X ( Fig. 4(a)), and short edges with S, to obtain an unreduced ESRBDD. We then apply Algorithm 1. We now show that this will not increase the ESRBDD size, and thus the resulting ESRBDD cannot be larger than the original BDD.
Lemma 3. Suppose we have an unreduced ESRBDD where, for every node q, there exists a rule κ ∈ {X, H 0 , L 0 } such that every edge to q is either S,q or κ,q . Then reducing the ESRBDD will not increase the number of nodes.
Proof: Apply Algorithm 1 and in line 5, always choose a node at the lowest level. Then, when a node q is chosen, all incoming edges to q will be labeled either with S or with κ. The S,q edges will not cause any node to be created. The κ,q edges will cause at most one node to be created. But then node q is removed. Thus, the overall number of nodes cannot increase.
It is also easy to convert a ZDD into a TBDD or ESRBDD. To obtain a TBDD, annotate every edge from non-terminal node p with the level tag lvl (p), so that ZDD reductions are used for all the edges; then reduce the TBDD. To obtain an ESRBDD, annotate long edges in the ZDD with H 0 , see Fig. 4(b), and short edges with S, and apply Algorithm 1.
The conversion from a chained DD to an unreduced ESRBDD is illustrated in Fig. 4(c) and (d). For each chain node x k : x i with x k > x i , create a "top node" with variable x k , and a "bottom node" with variable x i , that is only pointed to by its corresponding top node. In a CBDD, the top node will be a high-zero node, and all top nodes and non-chained nodes will have incoming edges labeled with X or S. In a CZDD, the top node will be a redundant node, and all top nodes and non-chained nodes will have incoming edges labeled with H 0 or S. At worst, the unreduced ESRBDD has twice the nodes of the original CBDD or CZDD and, from Lemma 3, reducing this ESRBDD does not increase its size.
In a TBDD, each edge can be characterized as short, purely X, purely H 0 , or partly X and partly H 0 . To convert into an ESRBDD, the short edges are labeled with S, the purely X edges are labeled with X, the purely H 0 edges are labeled with H 0 . Edges that are partly X and partly H 0 require the addition of a node at the level where the reduction rule changes, as shown in Fig. 4(e). The worst case occurs when every edge requires such a node. Then, since every TBDD node has two outgoing edges, the resulting unreduced ESRBDD will have triple the number of nodes. Since all of the introduced nodes have incoming X edges, and all other nodes have incoming S or H 0 edges, from Lemma 3 this ESRBDD will not increase in size when it is reduced. We note here that, if there are some purely X edges in the TBDD, then Lemma 3 no longer applies; however, the number of nodes that would be added during reduction is no more than the number of nodes saved by not having to introduce a node on the purely X edges. We now consider converting from ESRBDDs into the other DD types. In the case where L 0 edges are not allowed (row ESRBDD−L 0 in Table 1), the worst case BDD is from ESRBDD H 0 ,1 and the worst case ZDD is from ESRBDD X,1 . In both cases, the ESRBDD has 2 nodes, while the resulting BDD/ZDD has L + 2 nodes, giving ratios of L/2 + o(L), similar to the discussion in [6, p. 250]. The example ZDD in [2], which produces a CBDD with three times as many nodes, can be converted into an ESRBDD of the same size. Similarly, the example BDD in [2], which produces a CZDD with twice as many nodes, can be converted into an ESRBDD of the same size. Any ESRBDD without L 0 edges can be converted into a TBDD by labeling X edges with a level tag such that the X rule is always applied, and labelling H 0 edges with a level tag such that the H 0 rule is always applied. Therefore, the TBDD cannot be larger than the ESRBDD. An ESRBDD−L 0 can be converted into an ESRBDD by running Algorithm 1 to eliminate any low-zero nodes. For each low-zero node that is eliminated, we could have an incoming X and H 0 edge, causing the creation of two nodes. Suppose we eliminate n low-zero nodes that cause creation of two nodes. Then, because each low-zero node must have 2 incoming edges, we must have 2n incoming edges to these nodes. Above, we must have at least 2n − 1 nodes to produce these edges. We could then "stack" such a pattern m times. This gives an ESRBDD with m(n + 2n − 1) + 2 = m(3n − 1) + 2 nodes, and a reduced ESRBDD with m(2n + 2n − 1) + 2 = m(4n − 1) + 2 nodes. The upper bound of this ratio is 3/2, which occurs when n = 1 and m goes to infinity.
For the case of ESRBDDs with all types of edges (row ESRBDD in Table 1), the L 0 edge allows us to build different worst cases. Consider an ESRBDD S,p where lvl (p) = L, p[0] = H 0 ,1 , and p[1] = L 0 ,1 . This ESRBDD has 3 nodes.  ,067 1,486,430 1,486,430 1,486,430 1,486,430 Because BDDs cannot exploit H 0 or L 0 edges, this will produce a BDD with 2(L − 1) + 3 = 2L + 1 nodes, giving a worst-case ratio of 2L/3. The ZDD worstcase is similar, using instead p[0] = X,1 . Finally, for DD types that can exploit both X and H 0 edges, the ESRBDD L 0 ,1 corresponds to the worst case: the CBDD, CZDD, TBDD, and ESRBDD−L 0 will all require L + 2 nodes.

Experimental Results
We compare the performance of QBDDs (with long edges to 0), BDDs, ZDDs, CBDDs, CZDDs, TBDDs, and ESRBDDs on three sets of benchmarks. The first two benchmarks are similar to those used in [2], and are representative of general textual information and digital logic functions, respectively. The third benchmark is typical in state space analysis of concurrent systems.

Dictionaries
A dictionary can be encoded as an indicator function over the set of strings of a given length from either the compact alphabet consisting of the distinct symbols found in the dictionary plus NULL, or the full alphabet of all 128 ASCII characters (to ensure that all encoded strings have the same length, shorter ones are padded with the ASCII symbol NULL). We use the encoding schemes described in [2]: one-hot and binary. Therefore, each dictionary generates four benchmarks, one for each choice of encoding and alphabet. We compare the different DD types on two dictionaries. The first one is the English words in file /usr/share/dict/words under MacOS, containing 235,886 words with lengths ranging from 1 to 24. Its compact alphabet contains lower and upper case letters plus hyphen and NULL (54 in total). The second one is a set of passwords from SecLists [7] (non-ASCII characters are replaced with NULL), containing 999,999 passwords with lengths ranging from 1 to 39. Its compact alphabet consists of 91 symbols including NULL.  Table 2 reports the number of nodes required to store each dictionary, according to different encodings and alphabets (the best result on each row is in boldface). Except for QBDDs and BDDs, the one-hot encoding results in fewer nodes, demonstrating the effectiveness of the zero-suppressed idea when encoding large, sparse data. Among the DD types we consider, ESRBDDs have the fewest nodes, regardless of encoding and alphabet. For binary encodings, ESRBDDs use 19%-39% fewer nodes than TBDDs, the second best choice. With one-hot encodings, ZDDs, CZDDs, TBDDs, and ESRBDDs tie for best because (a) there are no redundant nodes and (b) any low-zero nodes that are eliminated do not cause an overall decrease in the number nodes in the ESRBDDs. Indeed, redundant nodes are rare even with binary encodings, as they arise when two words w 1 and w 2 not only have bit patterns that differ in a position, but they also share all their possible continuations, i.e., w 1 w is a word if and only if w 2 w is also a word, for all w . In the English word list, "Hlidhskjalf" and its alternate spelling "Hlithskjalf" is one such rare instance (note that no w can continue either of them to form an additional word).

Combinational Circuits
BDDs are commonly used to synthesize and verify digital circuits. We select a set of combinational circuits from the LGSynth'91 benchmarks [11] and, for each circuit, we build a DD encoding all its output logic functions. For each circuit, the variable order is determined using Sifting [9] while building the BDD. Table 3 reports the number of nodes needed to encode all outputs of each circuit. In contrast to the dictionaries, these benchmarks place importance on the ability to eliminate redundant nodes. Thus, QBDDs and ZDDs have the worst performance. TBDDs and ESRBDDs are always the two best representations, and the difference between them is less than 0.7%.

Safe Petri Nets
Decision diagrams are frequently used in symbolic model checking to represent sets of states. We have selected a set of 37 safe Petri nets from the 2018 Model Checking Contest https://mcc.lip6.fr/2018/. A Petri net is safe if each one of its places can contain at most one token-each place can, therefore, be mapped  directly to a boolean variable. Most of these models have scaling parameters that affect their size and complexity, yielding N = 103 model instances.
Providing detailed results for all the model instances would require excessive space, so to summarize over all model instances, Table 4 shows a score for each DD type i. The score is the geometric mean [4]: where N is the total number of model instances, T i (n) is the number of nodes needed to represent the state space of instance n using DD type i, and T min (n) is the smallest number of nodes needed to represent the state space of instance n by any of the DD types we consider. ESRBDDs have by far the smallest overall score, barely larger than 1, indicating that they are either the smallest or slightly larger than the smallest for each model instance. Table 5 shows T i (n) for model instances n that required more than 250,000 nodes in the QBDD representation. For parameterized models that had multiple model instances satisfying this criterion, we present data for only the largest such model instance. We have also included the results for DiscoveryGPU -the only model where ESRBDDs were not the best (they were a close second).

Memory Considerations: The Size of Nodes
So far, we have compared DD types based on how many nodes they require. However, the actual memory consumption also depends on the size of the respective nodes. All of these DDs store two child pointers. In addition, BDDs and ZDDs Table 6. Overhead of node sizes (bits per node) as compared to QBDD nodes. CBDD CZDD TBDD ESR−L0 ESR   16  +16  +16  +32  +32  +48  +18  +20  20  +20  +20  +40  +40  +60  +22  +24  32  +32  +32  +64  +64  +96  +34  +36 store a level, CBDDs and CZDDs store two levels, TBDDs store three levels, while ESRBDDs store a level and two edge rules. Since all short edges must be labeled by S, it is only necessary to label the long edges, and this requires log 2 n bits per edge if there are n non-S reduction rules. Without L 0 edges, a single bit distinguishes H 0 from X; otherwise, two bits are required for rules {H 0 , L 0 , X}. QBDD nodes are therefore the smallest (typically requiring 64 or 128 bits, when 32-bit or 64-bit pointers are used, respectively) and Table 6 indicates the additional cost required for each node type, when the level integers are stored using 16 bits (as suggested by [2]), 20 bits (as suggested by [10]), and 32 bits.

Level bits BDD ZDD
ESRBDDs are clearly more memory efficient than CBDDs, CZDDs and TBDDs. There are a few instances in our experiments where TBDDs use marginally fewer nodes than ESRBDDs (less than 3.2% fewer nodes in every such instance), but not enough to overcome their per-node memory overhead.

Conclusions
We have shown that ESRBDDs are a simple, yet efficient, generalization of previous attempts at combining reduction rules. Unlike previous efforts, they are not biased towards any particular reduction rule and therefore eliminate the need for the user to prioritize the reduction rules. They also provide a framework for further generalizations through additional reduction rules-for example, "highone" and "low-one", the duals of "low-zero" and "high-zero" respectively.
ESRBDDs allow users to select a subset of reduction rules that suit their needs, and make it possible to integrate domain-specific reduction rules (a common phenomenon) with a subset of existing ones. ESRBDD nodes are also more compact than all previous such efforts, and new reduction rules can be added at a small cost-log 2 n bits per edge, where n is the number of reduction rules. Our future efforts will be directed towards adapting BDD manipulation operations (such as Apply) to work with the reduction rules in ESRBDDs, and towards including complement edges and other reduction rules, such as "high-one", "lowone", or "identity" reductions, while maintaining canonicity.