Dual DFA Decomposition for Regular Expression Matching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing regular expression matching techniques, such as Deterministic Finite Automaton (DFA) and Non-Deterministic Finite Automaton (NFA), face challenges with exponential memory and time requirements due to state explosion, making them inefficient for complex patterns, especially in deep packet inspection and virus scanning applications.

Innovation Solution

The approach involves creating a second state machine from a modified regular expression set by mapping related symbols to unique symbols, allowing for parallel processing with a first state machine, and using deterministic finite state machines to reduce state complexity and memory requirements, thereby improving matching speed and efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If a complete DFA is constructed to match complex regular expressions, then matching precision is improved, but memory requirements explode exponentially

Engineering Contradiction:
Improvematching precisionVSAvoidmemory requirements
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent divides a complex regular expression into multiple simpler sub-expressions, each matched by a separate DFA. This segmentation allows the system to achieve comprehensive matching capability without constructing one enormous DFA, thereby controlling memory usage while maintaining matching precision through coordinated state validation across multiple DFAs.

Inventive Principle:
Principle #1Segmentation

2Reliability

If a DFA uses separate states for every possible partial match, then matching completeness is improved, but device complexity increases exponentially

Engineering Contradiction:
Improvematching completenessVSAvoidstate machine complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the complex regular expression into multiple sub-expressions, creating separate DFAs for each. This reduces the state complexity of individual DFAs while maintaining overall matching completeness through the coordination mechanism that validates states across all DFAs simultaneously.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates a universal matching framework where multiple simplified DFAs work together to achieve the functionality of a single complex DFA. Each DFA handles a specific sub-expression, and their coordinated operation provides universal matching capability for the entire regular expression set.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Device complexity

If an NFA is used to reduce state complexity, then device complexity is reduced, but time requirements increase due to multiple state traversals

Engineering Contradiction:
Improvestate machine complexityVSAvoidmatching time
Core Design Contradiction:
Device complexityVSLoss of time

Solution Approach 1:

The patent segments the regular expression into sub-expressions matched by separate DFAs, each processing input in a single pass. This avoids the multiple state traversals required by NFAs while keeping individual DFA complexities manageable through the segmentation approach.

Inventive Principle:
Principle #1Segmentation

4Quantity of substance

If DFA state compression techniques are applied, then memory requirements are reduced, but processing speed decreases due to additional operations in the critical path

Engineering Contradiction:
Improvememory usageVSAvoidmatching speed
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent uses segmentation to create multiple small DFAs instead of one large compressed DFA. This approach reduces memory usage through division while avoiding the performance penalty of compression algorithms, as each small DFA can be processed efficiently with minimal overhead operations.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP2561453B1A dual DFA decomposition for large scale regular expression matching
Publication Date: 2013.12.25 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • EP2561453B1 patent drawingFigure 1
  • EP2561453B1 patent drawingFigure 2
  • EP2561453B1 patent drawingFigure 3

AI summary

An apparatus comprises a data processing system for matching a first input string with a first regular expression set. The data processing system comprises a processor, a memory storing a computer program, a processor configured to execute the computer program. The computer program comprises instructions for performing mapping at least two related symbols of the first regular expression set to a unique symbol, generating a second input string by replacing each instance of the at least two related symbols in the first input string with the unique symbol, and operating a first state machine on the input string and a second state machine on the second input string to determine whether the first input string matches with the first regular expression set.