SDFA: Series DFA for Memory-Efficient Regular Expression Matching

  • Tingwen Liu
  • Yong Sun
  • Li Guo
  • Binxing Fang
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7381)


Regular expression (RegEx) matching plays an important role in various network, security and database applications. Deterministic finite automata (DFA) is the preferred representation to achieve online RegEx matching in backbone networks, because of its one single pass over inputs for multiple RegExes and guaranteed performance of O(1) memory bandwidth per symbol. However, DFA may occupy prohibitive amounts of memory due to the explosive growth in its state size. In this work, we propose Series DFA (SDFA) to address the problem. The main idea is to cut a complex RegEx into several ordered and small RegExes carefully, and then concatenate their compact DFAs in series to match. Experimental results show that SDFA can achieve significant reduction in memory size at the cost of limited number of memory bandwidth.


Regular Expression Memory Consumption State Size Memory Bandwidth Deterministic Finite Automaton 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Becchi, M., Crowley, P.: A Hybrid Finite Automaton for Practical Deep Packet Inspection. In: Proc. ACM CoNEXT Conference, pp. 1–12 (2007)Google Scholar
  2. 2.
    Becchi, M.: Regular Expression Processor,
  3. 3.
    Ficara, D., Giordano, S., Procissi, G., Vitucci, F., Antichi, G., Di Pietro, A.: An Improved DFA for Fast Regular Expression Matching. ACM SIGCOMM Computer Communication Review 38(5), 29–40 (2008)CrossRefGoogle Scholar
  4. 4.
    Kumar, S., Chandrasekaran, B., Turner, J., Varghese, G.: Curing Regular Expressions Matching Algorithms from Insomnia, Amnesia, and Acalculia. In: Proc. ACM/IEEE ANCS, pp. 155–164 (2007)Google Scholar
  5. 5.
    Kumar, S., Dharmapurikar, S., Yu, F., Crowley, P., Turner, J.: Algorithms to Accelerate Multiple Regular Expressions Matching for Deep Packet Inspection. In: Proc. ACM SIGCOMM, pp. 339–350 (2006)Google Scholar
  6. 6.
    Levandoski, J., Sommer, E., Strait, M.: Application Layer Packet Classifier for Linux,
  7. 7.
    Liu, T., Yang, Y., Liu, Y., Sun, Y., Guo, L.: An Efficient Regular Expressions Compression Algorithm From A New Perspective. In: Proc. IEEE INFOCOM, pp. 2129–2137 (2011)Google Scholar
  8. 8.
    Liu, Y., Guo, L., Liu, P., Tan, J.: Compressing Regular Expressions’ DFA Table by Matrix Decomposition. In: Domaratzki, M., Salomaa, K. (eds.) CIAA 2010. LNCS, vol. 6482, pp. 282–289. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  9. 9.
    Roesch, M.: Snort - Lightweight Intrusion Detection for Networks. In: Proc. USENIX LISA, pp. 229–238 (1999)Google Scholar
  10. 10.
    Rohrer, J., Atasu, K., van Lunteren, J., Hagleitner, C.: Memory-Efficient Distribution of Regular Expressions for Fast Deep Packet Inspection. In: Proc. IEEE/ACM CODES+ISSS, pp. 147–154 (2009)Google Scholar
  11. 11.
    Smith, R., Estan, C., Jha, S.: XFA: Faster Signature Matching with Extended Automata. In: Proc. IEEE S&P, pp. 187–201 (2008)Google Scholar
  12. 12.
    The Shmoo Group: Internet Traffic Traces,
  13. 13.
    Yu, F., Chen, Z., Diao, Y., Lakshman, T.V., Katz, R.H.: Fast and Memory-Efficient Regular Expression Matching for Deep Packet Inspection. In: Proc. ACM/IEEE ANCS, pp. 93–102 (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Tingwen Liu
    • 1
    • 2
  • Yong Sun
    • 1
    • 3
  • Li Guo
    • 1
    • 3
  • Binxing Fang
    • 3
  1. 1.Institute of Computing TechnologyChinese Academy of SciencesBeijingChina
  2. 2.Graduate University of Chinese Academy of SciencesBeijingChina
  3. 3.National Engineering Laboratory for Information Security TechnologiesBeijingChina

Personalised recommendations