This page contains the Hybrid_Fa Package documentation.
Bases: unittest.TestCase
Test module for class hybrid_fa.
Module for pattern match: algorithm for Hybrid Finite Automat.
Bases: netbench.pattern_match.b_automaton.b_Automaton
Class for Hybrid Finite Automat.
Indexes in self.tran_aut reffer to self.nfas list for particular NFA tails.
Borders states are recognized in self._is_special(state) method based on implementation of this approach in regex tool from M. Becchi. Arguments for this method are saved in self._SPECIAL_MIN_DEPTH, self._MAX_TX and self._MAX_HEAD_SIZE and have setters like self.set_max_head_state() etc. Every option could by turn off by set -1 as value.
DFA head of automaton is save in self.dfa, NFA tails are in self.nfas. Read instruction in __init__ method.
Raises: | empty_automaton_exception() |
---|
Return number of states in Hybrid automaton.
Returns: | Number of states in Hybrid automaton |
---|---|
Return type: | int |
Return number of transitions in Hybrid automaton.
Returns: | Number of transitions in Hybrid automaton |
---|---|
Return type: | int |
Report consumed memory in bytes. Read documentaion in b_dfa and b_nfa methods for more information.
Returns: | Returns number of bytes. |
---|---|
Return type: | int |
Report consumed memory in bytes. Read documentaion in b_dfa and b_nfa methods for more information.
Returns: | Returns number of bytes. |
---|---|
Return type: | int |
DFA head of automaton is save in self.dfa, NFA tails are in self.nfas. Read instruction in __init__ method.
Raises: | empty_automaton_exception() |
---|
Function will find patterns in the given string.
Parameters: |
|
---|---|
Returns: | Bitmap of matched regular expressions. |
Return type: | list(int) |
Set argument for _is_special() predicate.
Parameter: | max_head_size (int) – New value. Has to be greater or equal than 0, -1 for off. |
---|---|
Raises: | ValueError |
Set argument for _is_special() predicate.
Parameter: | max_tx (int) – New value. Has to be greater or equal than 0, -1 for off. |
---|---|
Raises: | ValueError |
Set argument for _is_special() predicate.
Parameter: | special_min_depth (int) – New value. Has to be greater than 0, -1 for off. |
---|---|
Raises: | ValueError |
Print states, alphabet, start, transitions, final, Flags of DFA part and NFA parts. And save graphviz dot file, representing graphical structure of nfa_data.
Parameter: | file_name (string) – Name of output DOT file |
---|