aboutsummaryrefslogtreecommitdiff
path: root/src/regex/test_regex_graph_api.c
diff options
context:
space:
mode:
authorMaximilian Szengel <gnunet@maxsz.de>2012-10-26 14:33:59 +0000
committerMaximilian Szengel <gnunet@maxsz.de>2012-10-26 14:33:59 +0000
commit7a741b2fa8c96076f8b05a2d08e4b6b3ba78360b (patch)
treebd6c9d2d20fe9fb8f405075e929b3056cdd67736 /src/regex/test_regex_graph_api.c
parent993a74c191842519ad6c82216fb7a0ee2bb09456 (diff)
downloadgnunet-7a741b2fa8c96076f8b05a2d08e4b6b3ba78360b.tar.gz
gnunet-7a741b2fa8c96076f8b05a2d08e4b6b3ba78360b.zip
- Added path compression parameter to DFA construction API
- Moved NFA construction to internal header - Added regex simulation profiler (for profiling the NFA, that results by merging several DFAs in the DHT, in a database)
Diffstat (limited to 'src/regex/test_regex_graph_api.c')
-rw-r--r--src/regex/test_regex_graph_api.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/regex/test_regex_graph_api.c b/src/regex/test_regex_graph_api.c
index b57c79edd..d429025d9 100644
--- a/src/regex/test_regex_graph_api.c
+++ b/src/regex/test_regex_graph_api.c
@@ -26,6 +26,7 @@
26#include <time.h> 26#include <time.h>
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_regex_lib.h" 28#include "gnunet_regex_lib.h"
29#include "regex_internal.h"
29 30
30#define KEEP_FILES 0 31#define KEEP_FILES 0
31 32
@@ -134,19 +135,19 @@ main (int argc, char *argv[])
134 135
135 136
136 // Check DFA graph creation 137 // Check DFA graph creation
137 a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i])); 138 a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i]), 0);
138 GNUNET_REGEX_automaton_save_graph (a, filename, GNUNET_REGEX_GRAPH_DEFAULT); 139 GNUNET_REGEX_automaton_save_graph (a, filename, GNUNET_REGEX_GRAPH_DEFAULT);
139 GNUNET_REGEX_automaton_destroy (a); 140 GNUNET_REGEX_automaton_destroy (a);
140 error += filecheck (filename); 141 error += filecheck (filename);
141 142
142 a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i])); 143 a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i]), 0);
143 GNUNET_REGEX_automaton_save_graph (a, filename, 144 GNUNET_REGEX_automaton_save_graph (a, filename,
144 GNUNET_REGEX_GRAPH_DEFAULT | 145 GNUNET_REGEX_GRAPH_DEFAULT |
145 GNUNET_REGEX_GRAPH_VERBOSE); 146 GNUNET_REGEX_GRAPH_VERBOSE);
146 GNUNET_REGEX_automaton_destroy (a); 147 GNUNET_REGEX_automaton_destroy (a);
147 error += filecheck (filename); 148 error += filecheck (filename);
148 149
149 a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i])); 150 a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i]), 0);
150 GNUNET_REGEX_automaton_save_graph (a, filename, 151 GNUNET_REGEX_automaton_save_graph (a, filename,
151 GNUNET_REGEX_GRAPH_DEFAULT | 152 GNUNET_REGEX_GRAPH_DEFAULT |
152 GNUNET_REGEX_GRAPH_COLORING); 153 GNUNET_REGEX_GRAPH_COLORING);
@@ -154,7 +155,7 @@ main (int argc, char *argv[])
154 error += filecheck (filename); 155 error += filecheck (filename);
155 156
156 157
157 a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i])); 158 a = GNUNET_REGEX_construct_dfa (regex[i], strlen (regex[i]), 0);
158 GNUNET_REGEX_automaton_save_graph (a, filename, GNUNET_REGEX_GRAPH_DEFAULT); //| 159 GNUNET_REGEX_automaton_save_graph (a, filename, GNUNET_REGEX_GRAPH_DEFAULT); //|
159 // GNUNET_REGEX_GRAPH_VERBOSE | 160 // GNUNET_REGEX_GRAPH_VERBOSE |
160 //GNUNET_REGEX_GRAPH_COLORING); 161 //GNUNET_REGEX_GRAPH_COLORING);