Presentation is loading. Please wait.

Presentation is loading. Please wait.

Memory-Efficient Regular Expression Search Using State Merging Department of Computer Science and Information Engineering National Cheng Kung University,

Similar presentations


Presentation on theme: "Memory-Efficient Regular Expression Search Using State Merging Department of Computer Science and Information Engineering National Cheng Kung University,"— Presentation transcript:

1 Memory-Efficient Regular Expression Search Using State Merging Department of Computer Science and Information Engineering National Cheng Kung University, Taiwan R.O.C. Authors: Michela Becchi; Srihari Cadambi Publisher: IEEE INFOCOM 2007 Present: Chia-Ming,Chang Date: 3, 18, 2009 1

2 Outline 1. Introduction 2. State merging 3. Experimental results 4. Conclusion 2

3 Introduction (1/4) 3

4 Introduction (2/4) 4

5 Introduction (3/4) 5 Fig. 3. (a) Rudimentary bitmap-based data structure. The lower part shows the bitmap and its transition table for State 3 from the example in Figure 1. Fig. 3. (b) More compact bitmap-based data structure using pointer indirection. a b c d e fghifghi 0 1 2

6 Introduction (4/4) 6 Bitmap-based data structures have two other disadvantages, especially when implemented in software. First; some computation(1’s counting) is necessary in order to process the bitmap and obtain an address into the transition table. Second: fetching the bitmap could require several memory accesses. These issues may be resolved to a certain extent by breaking up a large bitmap into several smaller bitmaps, each annotated with some extra information.

7 Outline 1. Introduction 2. State merging 3. Experimental results 4. Conclusion 7

8 Architecture (1/8) 8 1 2 3 a b 1_23 0 1 a/0,b/1 source State merging method : source label

9 Architecture (2/8) 9 1 2 3 a b 12_3 0 1 a.0,b.1 destination State merging method : destination label

10 Architecture (3/8) 8 10

11 Architecture (4/8) 8 11

12 Architecture (5/8) 12 a b c d e f a f g h 0 1

13 Architecture (2/3) 13 G is the weight graph corresponding to D. D is the DFA being processed, e is an edge in G, h is a heap storing weight graph edges ordered according to edge weights. two DFA states s and t, metric(s, t) is a measure of the memory savings when s and t are merged. max labels is the maximum number of labels allowed.

14 Architecture (7/8) 14 Algorithm V.1 shows the core of our procedure, which is a loop that terminates when merging can no longer produce memory savings, or if more than the maximum allowed labels are required. Algorithm V.2 constructs the weight graph G and stores the edges in heap h. It considers all pairs of states in the given DFA. If the total number of sub- states in the state pair under consideration is less than the number of labels,it evaluates metric(s, t) and assigns it to the weight of the edge connecting states s and t in the weight graph. Recall that metric(s, t) is an exact measure of the memory savings possible when states s and t are merged. Algorithm V.3 recalculates the metric corresponding to state pairs where one state is connected to the merged state.

15 Architecture (8/8) 15

16 Outline 1. Introduction 2. State merging 3. Experimental results 4. Conclusion 16

17 Experimental results (1/2) 17 Merging-128 labels

18 Experimental results (2/2) 18

19 Outline 1. Introduction 2. Architecture 3. Experimental results 4. Conclusion 19

20 Conclusion (1/1) 20 We describe a compact data structure that can representa DFA with merged states and transition labels. We present a merging and labeling algorithm. We extend the bitmap data structure proposed for string matching [7] to DFAs, and introduce a modification using pointer indirection, which also reduces memory usage in its own right. We present an analysis of our scheme, and perform a systematic experimental study comparing state merging to previous compaction techniques.


Download ppt "Memory-Efficient Regular Expression Search Using State Merging Department of Computer Science and Information Engineering National Cheng Kung University,"

Similar presentations


Ads by Google