Delay_Dfa Documentation

This page contains the Delay_Dfa Package documentation.

The test_ddfa Module

class netbench.pattern_match.algorithms.delay_dfa.test_ddfa.test_ddfa(methodName='runTest')

Bases: unittest.TestCase

Test module for Delay DFA

test_compute()
compute()
test_get_default_trans_num()
get_default_trans_num
search()
test_set_bound()
set_bound()

The ddfa Module

Module for pattern match: algorithm for Delayed Input DFA.

class netbench.pattern_match.algorithms.delay_dfa.ddfa.DELAY_DFA

Bases: netbench.pattern_match.b_dfa.b_dfa

Class for Delayed Input DFA automat.

Based on:
“Algorithms to accelerate multiple regular expressions matching for deep packet inspection” ISBN: 1-59593-308-5 URL: http://portal.acm.org/citation.cfm?id=1159952

Delayed Input DFA substantially reduces space requirements as compared to a DFA. DDFA is constructed by transforming a DFA via incrementally replacing several transitions of the automaton with a single default transition. A DDFA represents reduces transitions by more than 95%.

SaveToFile(FileName)

This method creates the file which represents the Delay DFA automat. This file will be input into algorithm written in C language.

Parameter:FileName (string) – Name of file into which Delay DFA automat representation will be saved.
compute(c_dfa=True)

This method computes Delayed Input DFA automat.

Parameter:c_dfa (bool) – compute DFA(Delault is true,so compute() is called to create DFA)
Raises:COMPUTE_ERROR
get_default_trans_num()

This method returns the number of default transitions in Delay DFA automaton.

Returns:number of default transitions
Return type:int
search(input_string)

This function will find patterns in the given string.

Parameters:
  • input_string – Input string.
  • input_string – string
Returns:

Bitmap of matched regular expressions.

Return type:

list(int)

set_bound(d_b=0)

This method sets diameter bound.

Parameter:d_b (int) – diameter bound

Default is zero, which means no limit in construction of Delay DFA.

class netbench.pattern_match.algorithms.delay_dfa.ddfa.SPANNING_TREE
Class for representation one spanning tree, which are needed for finding default transitions.

Table Of Contents

Previous topic

Sourdis_Bispo_Nfa Documentation

Next topic

J_History_Fa Documentation

This Page