diff --git a/Makefile b/Makefile index c51f9c9e7..19ccf1010 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ SUBDIR += tests/glob SUBDIR += tests/like SUBDIR += tests/literal SUBDIR += tests/minimise +SUBDIR += tests/pcre SUBDIR += tests/reverse SUBDIR += tests/union SUBDIR += tests/set diff --git a/fuzz/Makefile b/fuzz/Makefile index f34122d55..5fcf4758c 100644 --- a/fuzz/Makefile +++ b/fuzz/Makefile @@ -9,7 +9,6 @@ SRC += fuzz/fuzz_adt_priq.c SRC += fuzz/fuzz_adt_set.c SRC += fuzz/fuzz_literals.c SRC += fuzz/fuzz_nfa.c -SRC += fuzz/fuzz_nfa_slow.c SRC += fuzz/fuzz_re_parser.c SRC += fuzz/fuzz_re_parser_literal.c SRC += fuzz/fuzz_re_parser_pcre.c @@ -30,22 +29,10 @@ PROPNAME.fuzz_libfsm += adt PROPNAME.fuzz_libfsm += nfa_edge_order_should_not_matter PROPNAME.fuzz_libfsm += nfa_minimise_should_not_add_states PROPNAME.fuzz_libfsm += nfa_operations_should_not_impact_matching -PROPNAME.fuzz_libfsm += nfa_regress_minimise_false_positive -PROPNAME.fuzz_libfsm += nfa_regress_slow_determinise -# PROPNAME.fuzz_libfsm += nfa_slow_determinise # TODO: too slow for now PROPNAME.fuzz_libfsm += re_parser_literal PROPNAME.fuzz_libfsm += re_parser_pcre - PROPNAME.fuzz_libfsm += re_pcre_minimize -# PROPNAME.fuzz_libfsm += re_regress1 -# PROPNAME.fuzz_libfsm += re_regress2 -# PROPNAME.fuzz_libfsm += re_regress3 -# PROPNAME.fuzz_libfsm += re_regress4 -# PROPNAME.fuzz_libfsm += re_regress5 -# PROPNAME.fuzz_libfsm += re_regress6 -# PROPNAME.fuzz_libfsm += re_regress_aBx -PROPNAME.fuzz_libfsm += re_regress PROPNAME.fuzz_libfsm += union_literals diff --git a/fuzz/fuzz_adt_priq.c b/fuzz/fuzz_adt_priq.c index 268760e4f..c830a450f 100644 --- a/fuzz/fuzz_adt_priq.c +++ b/fuzz/fuzz_adt_priq.c @@ -67,7 +67,7 @@ repeat_with_verbose(const struct theft_hook_trial_post_info *info, } static bool -test_priq_operations(uintptr_t limit) +test_priq_operations(uintptr_t limit, theft_seed seed) { enum theft_run_res res; @@ -120,7 +120,7 @@ test_priq_operations(uintptr_t limit) .enable = true, }, - .seed = theft_seed_of_time(), + .seed = seed, .always_seed_count = sizeof always_seeds / sizeof *always_seeds, .always_seeds = always_seeds }; diff --git a/fuzz/fuzz_adt_set.c b/fuzz/fuzz_adt_set.c index 35d5d66a0..93df2fd5a 100644 --- a/fuzz/fuzz_adt_set.c +++ b/fuzz/fuzz_adt_set.c @@ -50,7 +50,7 @@ repeat_with_verbose(const struct theft_hook_trial_post_info *info, } static bool -test_set_operations(uintptr_t limit2) +test_set_operations(theft_seed seed, uintptr_t limit2) { enum theft_run_res res; @@ -68,7 +68,7 @@ test_set_operations(uintptr_t limit2) .trial_post = repeat_with_verbose, .env = &env, }, - .seed = theft_seed_of_time(), + .seed = seed, .trials = 100000, .fork = { .enable = true, @@ -83,7 +83,7 @@ test_set_operations(uintptr_t limit2) } static bool -test_set_equality(void) +test_set_equality(theft_seed seed) { enum theft_run_res res; @@ -100,7 +100,7 @@ test_set_equality(void) .trial_post = repeat_with_verbose, .env = &env, }, - .seed = theft_seed_of_time(), + .seed = seed, .trials = 10000, .fork = { .enable = true, @@ -116,7 +116,8 @@ test_set_equality(void) return res == THEFT_RUN_PASS; } -static enum theft_trial_res prop_set_equality(struct theft *t, void *arg1) +static enum +theft_trial_res prop_set_equality(struct theft *t, void *arg1) { struct set_hook_env *env; struct set_sequence *seq = arg1; diff --git a/fuzz/fuzz_libfsm.h b/fuzz/fuzz_libfsm.h index 5210280bb..f513f8a6c 100644 --- a/fuzz/fuzz_libfsm.h +++ b/fuzz/fuzz_libfsm.h @@ -50,8 +50,8 @@ struct string_pair { void print_or_hexdump(FILE *f, const uint8_t *buf, size_t size); void hexdump(FILE *f, const uint8_t *buf, size_t size); -typedef bool test_fun(void); -typedef bool test_fun1(uintptr_t arg); +typedef bool test_fun(theft_seed); +typedef bool test_fun1(theft_seed, uintptr_t arg); void reg_test(const char *name, test_fun *test); void reg_test1(const char *name, test_fun1 *test, uintptr_t arg); @@ -75,15 +75,6 @@ enum theft_hook_trial_post_res trial_post_inc_verbosity(const struct theft_hook_trial_post_info *info, void *penv); -bool test_re_parser_literal(uint8_t verbosity, - const uint8_t *re, size_t re_size, - size_t count, const struct string_pair *pairs); - -bool test_re_parser_pcre(uint8_t verbosity, - const uint8_t *re_string, size_t re_size, - size_t pos_count, const struct string_pair *pos_pairs, - size_t neg_count, const struct string_pair *neg_pairs); - size_t delta_msec(const struct timeval *pre, const struct timeval *post); size_t *gen_permutation_vector(size_t length, uint32_t seed); diff --git a/fuzz/fuzz_literals.c b/fuzz/fuzz_literals.c index 3b5b330b2..eb4cd0ad0 100644 --- a/fuzz/fuzz_literals.c +++ b/fuzz/fuzz_literals.c @@ -25,7 +25,7 @@ static const struct fsm_options opt = { }; static bool -test_union_literals(void) +test_union_literals(theft_seed seed) { enum theft_run_res res; struct theft_type_info arg_info; @@ -46,7 +46,7 @@ test_union_literals(void) .env = &env, }, - .seed = theft_seed_of_time(), + .seed = seed, .fork = { .enable = true, }, diff --git a/fuzz/fuzz_nfa.c b/fuzz/fuzz_nfa.c index 6955b7106..bc96c55e8 100644 --- a/fuzz/fuzz_nfa.c +++ b/fuzz/fuzz_nfa.c @@ -9,9 +9,6 @@ #include "type_info_nfa.h" #include "type_info_fsm_literal.h" -/* In test_nfa_slow.c */ -bool test_nfa_regress_slow_determinise(void); - static struct fsm * nfa_of_spec(struct nfa_spec *spec, bool shuffle); @@ -25,8 +22,6 @@ static enum theft_trial_res prop_nfa_edge_order_should_not_matter(struct theft *t, void *arg1); static enum theft_trial_res -prop_slow_determinise(struct theft *t, void *arg1); -static enum theft_trial_res prop_nfa_minimise_should_not_add_states(struct theft *t, void *arg1); @@ -70,7 +65,7 @@ shrink_pre(const struct theft_hook_shrink_pre_info *info, } static bool -nfa_operations_should_not_impact_matching(void) +nfa_operations_should_not_impact_matching(theft_seed seed) { enum theft_run_res res; @@ -98,7 +93,7 @@ nfa_operations_should_not_impact_matching(void) .env = &env, }, - .seed = theft_seed_of_time(), + .seed = seed, .fork = { .enable = true, //.timeout = 1000, @@ -402,7 +397,8 @@ nfa_of_spec(struct nfa_spec *spec, bool shuffle) return nfa; } -static bool nfa_edge_order_should_not_matter(void) +static bool +nfa_edge_order_should_not_matter(theft_seed seed) { enum theft_run_res res; @@ -426,7 +422,7 @@ static bool nfa_edge_order_should_not_matter(void) .env = &env, }, - .seed = theft_seed_of_time(), + .seed = seed, .fork = { .enable = true, }, @@ -493,146 +489,7 @@ prop_nfa_edge_order_should_not_matter(struct theft *t, } static bool -nfa_regress_minimise_false_positive(void) -{ - struct fsm *nfa; - struct fsm_state *st; - bool match; -#define STATE_COUNT 2 - struct fsm_state *states[STATE_COUNT]; - uint8_t str[] = { 0x00 }; - struct string_pair pair = { - .string = str, - .size = sizeof str - }; - - nfa = fsm_new(&test_nfa_fsm_options); - assert(nfa); /* XXX */ - - for (size_t i = 0; i < STATE_COUNT; i++) { - states[i] = fsm_addstate(nfa); - assert(states[i]); /* XXX */ - } - - fsm_setstart(nfa, states[0]); - - if (!fsm_addedge_any(nfa, states[1], states[1])) { - assert(false); - } - - fsm_setend(nfa, states[STATE_COUNT - 1], 1); -#undef STATE_COUNT - - printf("BEFORE fsm_minimise\n"); - fsm_print(nfa, stdout, FSM_OUT_DOT); - - if (!fsm_minimise(nfa)) { - assert(false); - } - - printf("AFTER fsm_minimise\n"); - fsm_print(nfa, stdout, FSM_OUT_DOT); - - st = wrap_fsm_exec(nfa, &pair); - - match = (st != NULL); - - fsm_free(nfa); - - return !match; -} - -static bool -nfa_slow_determinise(void) -{ - enum theft_run_res res; - - //seed = 0xe0083991257118b0LLU; - - struct test_env env = { - .tag = 'E', - .verbosity = 0, - .shrink_timeout = 60, - }; - - struct theft_run_config cfg = { - .name = __func__, - .prop1 = prop_slow_determinise, - .type_info = { &type_info_nfa, }, - .hooks = { - .trial_pre = trial_pre_fail_once, - .trial_post = trial_post_inc_verbosity, - .shrink_pre = shrink_pre, - .env = &env, - }, - .seed = theft_seed_of_time(), - .fork = { - .enable = true, - }, - }; - - res = theft_run(&cfg); - - return res == THEFT_RUN_PASS; -} - -static enum theft_trial_res -prop_slow_determinise(struct theft *t, void *arg1) -{ - struct nfa_spec *nfa_spec = arg1; - enum theft_trial_res res; - struct timeval pre, post; - struct test_env *env; - struct fsm *nfa; - uint8_t verbosity; - size_t elapsed_msec; - - env = theft_hook_get_env(t); - assert(env->tag == 'E'); - verbosity = env->verbosity; - - assert(nfa_spec->tag == 'N'); - - if (nfa_spec->state_count == 0) { - return THEFT_TRIAL_SKIP; - } - - nfa = nfa_of_spec(nfa_spec, false); - if (nfa == NULL) { - return THEFT_TRIAL_ERROR; - } - - if (-1 == gettimeofday(&pre, NULL)) { - assert(false); - return false; - } - if (!fsm_determinise(nfa)) { - fprintf(stdout, "FAIL: determinise\n"); - return THEFT_TRIAL_ERROR; - } - if (-1 == gettimeofday(&post, NULL)) { - assert(false); - return false; - } - elapsed_msec = 1000 * (post.tv_sec - pre.tv_sec) - + (post.tv_usec / 1000 - pre.tv_usec / 1000); - - if (verbosity > 0) { - fprintf(stdout, "%s: fsm_determinise took %zd msec\n", - __func__, elapsed_msec); - } - - res = elapsed_msec < 2000 - ? THEFT_TRIAL_PASS - : THEFT_TRIAL_FAIL; - - fsm_free(nfa); - - return res; -} - -static bool -nfa_minimise_should_not_add_states(void) +nfa_minimise_should_not_add_states(theft_seed seed) { enum theft_run_res res; @@ -652,7 +509,7 @@ nfa_minimise_should_not_add_states(void) .shrink_pre = shrink_pre, .env = &env, }, - .seed = theft_seed_of_time(), + .seed = seed, .fork = { .enable = true, }, @@ -716,13 +573,7 @@ register_test_nfa(void) nfa_operations_should_not_impact_matching); reg_test("nfa_edge_order_should_not_matter", nfa_edge_order_should_not_matter); - reg_test("nfa_regress_minimise_false_positive", - nfa_regress_minimise_false_positive); - reg_test("nfa_slow_determinise", - nfa_slow_determinise); - reg_test("nfa_regress_slow_determinise", - test_nfa_regress_slow_determinise); - - reg_test("nfa_minimise_should_not_add_states", nfa_minimise_should_not_add_states); + reg_test("nfa_minimise_should_not_add_states", + nfa_minimise_should_not_add_states); } diff --git a/fuzz/fuzz_nfa_slow.c b/fuzz/fuzz_nfa_slow.c deleted file mode 100644 index 07747b5ec..000000000 --- a/fuzz/fuzz_nfa_slow.c +++ /dev/null @@ -1,1191 +0,0 @@ -/* - * Copyright 2017 Scott Vokes - * - * See LICENCE for the full copyright terms. - */ - -#include "fuzz_libfsm.h" - -#include "type_info_nfa.h" - -bool test_nfa_regress_slow_determinise(void) -{ - struct fsm *nfa = fsm_new(&test_nfa_fsm_options); - struct fsm_state *states[153] = { NULL }; - struct timeval pre, post; - size_t elapsed_msec; - - // first pass: states - states[0] = fsm_addstate(nfa); assert(states[0]); - states[1] = fsm_addstate(nfa); assert(states[1]); fsm_setend(nfa, states[1], 1); - states[2] = fsm_addstate(nfa); assert(states[2]); - states[3] = fsm_addstate(nfa); assert(states[3]); - states[4] = fsm_addstate(nfa); assert(states[4]); - states[5] = fsm_addstate(nfa); assert(states[5]); fsm_setend(nfa, states[5], 1); - states[6] = fsm_addstate(nfa); assert(states[6]); fsm_setend(nfa, states[6], 1); - states[7] = fsm_addstate(nfa); assert(states[7]); - states[8] = fsm_addstate(nfa); assert(states[8]); - states[9] = fsm_addstate(nfa); assert(states[9]); - states[10] = fsm_addstate(nfa); assert(states[10]); - states[11] = fsm_addstate(nfa); assert(states[11]); fsm_setend(nfa, states[11], 1); - states[12] = fsm_addstate(nfa); assert(states[12]); - states[13] = fsm_addstate(nfa); assert(states[13]); - states[14] = fsm_addstate(nfa); assert(states[14]); - states[15] = fsm_addstate(nfa); assert(states[15]); - states[16] = fsm_addstate(nfa); assert(states[16]); - states[17] = fsm_addstate(nfa); assert(states[17]); - states[18] = fsm_addstate(nfa); assert(states[18]); - states[19] = fsm_addstate(nfa); assert(states[19]); - states[20] = fsm_addstate(nfa); assert(states[20]); - states[21] = fsm_addstate(nfa); assert(states[21]); - states[22] = fsm_addstate(nfa); assert(states[22]); - states[23] = fsm_addstate(nfa); assert(states[23]); - states[24] = fsm_addstate(nfa); assert(states[24]); - states[25] = fsm_addstate(nfa); assert(states[25]); - states[26] = fsm_addstate(nfa); assert(states[26]); - states[27] = fsm_addstate(nfa); assert(states[27]); - states[28] = fsm_addstate(nfa); assert(states[28]); - states[29] = fsm_addstate(nfa); assert(states[29]); - states[30] = fsm_addstate(nfa); assert(states[30]); - states[31] = fsm_addstate(nfa); assert(states[31]); - states[32] = fsm_addstate(nfa); assert(states[32]); - states[33] = fsm_addstate(nfa); assert(states[33]); - states[34] = fsm_addstate(nfa); assert(states[34]); - states[35] = fsm_addstate(nfa); assert(states[35]); - states[36] = fsm_addstate(nfa); assert(states[36]); - states[37] = fsm_addstate(nfa); assert(states[37]); - states[38] = fsm_addstate(nfa); assert(states[38]); - states[39] = fsm_addstate(nfa); assert(states[39]); - states[40] = fsm_addstate(nfa); assert(states[40]); - states[41] = fsm_addstate(nfa); assert(states[41]); - states[42] = fsm_addstate(nfa); assert(states[42]); - states[43] = fsm_addstate(nfa); assert(states[43]); - states[44] = fsm_addstate(nfa); assert(states[44]); - states[45] = fsm_addstate(nfa); assert(states[45]); - states[46] = fsm_addstate(nfa); assert(states[46]); - states[47] = fsm_addstate(nfa); assert(states[47]); - states[48] = fsm_addstate(nfa); assert(states[48]); - states[49] = fsm_addstate(nfa); assert(states[49]); - states[50] = fsm_addstate(nfa); assert(states[50]); fsm_setend(nfa, states[50], 1); - states[51] = fsm_addstate(nfa); assert(states[51]); - states[52] = fsm_addstate(nfa); assert(states[52]); - states[53] = fsm_addstate(nfa); assert(states[53]); - states[54] = fsm_addstate(nfa); assert(states[54]); - states[55] = fsm_addstate(nfa); assert(states[55]); - states[56] = fsm_addstate(nfa); assert(states[56]); - states[57] = fsm_addstate(nfa); assert(states[57]); - states[58] = fsm_addstate(nfa); assert(states[58]); - states[59] = fsm_addstate(nfa); assert(states[59]); - states[60] = fsm_addstate(nfa); assert(states[60]); - states[61] = fsm_addstate(nfa); assert(states[61]); - states[62] = fsm_addstate(nfa); assert(states[62]); - states[63] = fsm_addstate(nfa); assert(states[63]); - states[64] = fsm_addstate(nfa); assert(states[64]); - states[65] = fsm_addstate(nfa); assert(states[65]); - states[66] = fsm_addstate(nfa); assert(states[66]); - states[67] = fsm_addstate(nfa); assert(states[67]); - states[68] = fsm_addstate(nfa); assert(states[68]); - states[69] = fsm_addstate(nfa); assert(states[69]); - states[70] = fsm_addstate(nfa); assert(states[70]); - states[71] = fsm_addstate(nfa); assert(states[71]); - states[72] = fsm_addstate(nfa); assert(states[72]); - states[73] = fsm_addstate(nfa); assert(states[73]); - states[74] = fsm_addstate(nfa); assert(states[74]); - states[75] = fsm_addstate(nfa); assert(states[75]); - states[76] = fsm_addstate(nfa); assert(states[76]); - states[77] = fsm_addstate(nfa); assert(states[77]); - states[78] = fsm_addstate(nfa); assert(states[78]); - states[79] = fsm_addstate(nfa); assert(states[79]); - states[80] = fsm_addstate(nfa); assert(states[80]); - states[81] = fsm_addstate(nfa); assert(states[81]); - states[82] = fsm_addstate(nfa); assert(states[82]); - states[83] = fsm_addstate(nfa); assert(states[83]); - states[84] = fsm_addstate(nfa); assert(states[84]); - states[85] = fsm_addstate(nfa); assert(states[85]); - states[86] = fsm_addstate(nfa); assert(states[86]); - states[87] = fsm_addstate(nfa); assert(states[87]); - states[88] = fsm_addstate(nfa); assert(states[88]); - states[89] = fsm_addstate(nfa); assert(states[89]); - states[90] = fsm_addstate(nfa); assert(states[90]); - states[91] = fsm_addstate(nfa); assert(states[91]); - states[92] = fsm_addstate(nfa); assert(states[92]); - states[93] = fsm_addstate(nfa); assert(states[93]); - states[94] = fsm_addstate(nfa); assert(states[94]); - states[95] = fsm_addstate(nfa); assert(states[95]); - states[96] = fsm_addstate(nfa); assert(states[96]); - states[97] = fsm_addstate(nfa); assert(states[97]); - states[98] = fsm_addstate(nfa); assert(states[98]); - states[99] = fsm_addstate(nfa); assert(states[99]); - states[100] = fsm_addstate(nfa); assert(states[100]); - states[101] = fsm_addstate(nfa); assert(states[101]); - states[102] = fsm_addstate(nfa); assert(states[102]); - states[103] = fsm_addstate(nfa); assert(states[103]); - states[104] = fsm_addstate(nfa); assert(states[104]); - states[105] = fsm_addstate(nfa); assert(states[105]); - states[106] = fsm_addstate(nfa); assert(states[106]); - states[107] = fsm_addstate(nfa); assert(states[107]); - states[108] = fsm_addstate(nfa); assert(states[108]); - states[109] = fsm_addstate(nfa); assert(states[109]); - states[110] = fsm_addstate(nfa); assert(states[110]); - states[111] = fsm_addstate(nfa); assert(states[111]); - states[112] = fsm_addstate(nfa); assert(states[112]); - states[113] = fsm_addstate(nfa); assert(states[113]); - states[114] = fsm_addstate(nfa); assert(states[114]); - states[115] = fsm_addstate(nfa); assert(states[115]); - states[116] = fsm_addstate(nfa); assert(states[116]); fsm_setend(nfa, states[116], 1); - states[117] = fsm_addstate(nfa); assert(states[117]); - states[118] = fsm_addstate(nfa); assert(states[118]); - states[119] = fsm_addstate(nfa); assert(states[119]); - states[120] = fsm_addstate(nfa); assert(states[120]); fsm_setend(nfa, states[120], 1); - states[121] = fsm_addstate(nfa); assert(states[121]); - states[122] = fsm_addstate(nfa); assert(states[122]); - states[123] = fsm_addstate(nfa); assert(states[123]); - states[124] = fsm_addstate(nfa); assert(states[124]); - states[125] = fsm_addstate(nfa); assert(states[125]); - states[126] = fsm_addstate(nfa); assert(states[126]); - states[127] = fsm_addstate(nfa); assert(states[127]); - states[128] = fsm_addstate(nfa); assert(states[128]); - states[129] = fsm_addstate(nfa); assert(states[129]); - states[130] = fsm_addstate(nfa); assert(states[130]); - states[131] = fsm_addstate(nfa); assert(states[131]); - states[132] = fsm_addstate(nfa); assert(states[132]); - states[133] = fsm_addstate(nfa); assert(states[133]); - states[134] = fsm_addstate(nfa); assert(states[134]); - states[135] = fsm_addstate(nfa); assert(states[135]); - states[136] = fsm_addstate(nfa); assert(states[136]); - states[137] = fsm_addstate(nfa); assert(states[137]); - states[138] = fsm_addstate(nfa); assert(states[138]); - states[139] = fsm_addstate(nfa); assert(states[139]); - states[140] = fsm_addstate(nfa); assert(states[140]); - states[141] = fsm_addstate(nfa); assert(states[141]); - states[142] = fsm_addstate(nfa); assert(states[142]); - states[143] = fsm_addstate(nfa); assert(states[143]); - states[144] = fsm_addstate(nfa); assert(states[144]); - states[145] = fsm_addstate(nfa); assert(states[145]); - states[146] = fsm_addstate(nfa); assert(states[146]); - states[147] = fsm_addstate(nfa); assert(states[147]); - states[148] = fsm_addstate(nfa); assert(states[148]); - states[149] = fsm_addstate(nfa); assert(states[149]); - states[150] = fsm_addstate(nfa); assert(states[150]); - states[151] = fsm_addstate(nfa); assert(states[151]); - states[152] = fsm_addstate(nfa); assert(states[152]); - fsm_setstart(nfa, states[0]); - -// second pass: edges - if (!fsm_addedge_epsilon(nfa, states[0], states[36])) { assert(false); } - if (!fsm_addedge_any(nfa, states[0], states[57])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[0], states[50], (char)0xd1)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[0], states[125], (char)0xb8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[0], states[29], (char)0x3f)) { assert(false); } - if (!fsm_addedge_any(nfa, states[0], states[46])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[0], states[110])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[0], states[43])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[0], states[60], (char)0xd4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[0], states[56], (char)0x12)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[0], states[79])) { assert(false); } - if (!fsm_addedge_any(nfa, states[0], states[96])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[0], states[80], (char)0x2e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[0], states[44], (char)0x86)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[1], states[99], (char)0x07)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[1], states[103], (char)0x6b)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[1], states[31])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[1], states[104], (char)0xf9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[1], states[4], (char)0x3a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[1], states[77])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[1], states[6])) { assert(false); } - if (!fsm_addedge_any(nfa, states[1], states[34])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[1], states[29], (char)0x53)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[1], states[52], (char)0x5c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[1], states[105], (char)0x85)) { assert(false); } - if (!fsm_addedge_any(nfa, states[1], states[49])) { assert(false); } - if (!fsm_addedge_any(nfa, states[2], states[96])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[2], states[5], (char)0xdd)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[2], states[4], (char)0x15)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[2], states[12])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[2], states[109], (char)0x7e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[2], states[44], (char)0xba)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[2], states[148], (char)0x39)) { assert(false); } - if (!fsm_addedge_any(nfa, states[2], states[52])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[2], states[42])) { assert(false); } - if (!fsm_addedge_any(nfa, states[2], states[44])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[2], states[50], (char)0x59)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[2], states[72], (char)0x80)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[2], states[54])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[3], states[108], (char)0xa7)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[3], states[26])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[3], states[15], (char)0x3e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[3], states[137], (char)0xaf)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[3], states[39], (char)0xd9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[3], states[50], (char)0x5a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[3], states[13], (char)0x58)) { assert(false); } - if (!fsm_addedge_any(nfa, states[4], states[73])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[4], states[19], (char)0x48)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[4], states[8], (char)0x96)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[4], states[89], (char)0x2a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[5], states[149], (char)0xbb)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[5], states[33])) { assert(false); } - if (!fsm_addedge_any(nfa, states[5], states[48])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[5], states[18])) { assert(false); } - if (!fsm_addedge_any(nfa, states[6], states[34])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[6], states[107], (char)0x38)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[6], states[44], (char)0x22)) { assert(false); } - if (!fsm_addedge_any(nfa, states[6], states[43])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[6], states[40])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[6], states[80])) { assert(false); } - if (!fsm_addedge_any(nfa, states[6], states[23])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[6], states[102])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[6], states[4], (char)0x46)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[6], states[72], (char)0xda)) { assert(false); } - if (!fsm_addedge_any(nfa, states[6], states[56])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[7], states[138])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[7], states[123])) { assert(false); } - if (!fsm_addedge_any(nfa, states[7], states[151])) { assert(false); } - if (!fsm_addedge_any(nfa, states[8], states[23])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[8], states[70], (char)0x9a)) { assert(false); } - if (!fsm_addedge_any(nfa, states[8], states[117])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[8], states[0])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[8], states[105], (char)0x3e)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[8], states[24])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[8], states[39], (char)0xb8)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[8], states[83])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[8], states[45])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[8], states[147], (char)0xf3)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[8], states[63], (char)0x5d)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[8], states[16])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[9], states[29], (char)0x33)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[9], states[116], (char)0xc5)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[9], states[117])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[9], states[81])) { assert(false); } - if (!fsm_addedge_any(nfa, states[9], states[75])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[9], states[24], (char)0xea)) { assert(false); } - if (!fsm_addedge_any(nfa, states[9], states[35])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[9], states[143])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[9], states[71], (char)0xc8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[9], states[20], (char)0x11)) { assert(false); } - if (!fsm_addedge_any(nfa, states[9], states[141])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[9], states[21])) { assert(false); } - if (!fsm_addedge_any(nfa, states[10], states[1])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[10], states[26], (char)0xdb)) { assert(false); } - if (!fsm_addedge_any(nfa, states[10], states[68])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[10], states[130], (char)0x53)) { assert(false); } - if (!fsm_addedge_any(nfa, states[10], states[52])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[10], states[47], (char)0x51)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[10], states[141])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[10], states[19])) { assert(false); } - if (!fsm_addedge_any(nfa, states[10], states[19])) { assert(false); } - if (!fsm_addedge_any(nfa, states[10], states[6])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[10], states[29])) { assert(false); } - if (!fsm_addedge_any(nfa, states[10], states[16])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[11], states[33], (char)0x4f)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[11], states[129], (char)0xeb)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[11], states[68], (char)0x5e)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[12], states[90])) { assert(false); } - if (!fsm_addedge_any(nfa, states[12], states[11])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[12], states[70], (char)0x8d)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[12], states[4])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[12], states[116], (char)0x41)) { assert(false); } - if (!fsm_addedge_any(nfa, states[12], states[34])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[12], states[129], (char)0x9a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[12], states[15])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[12], states[77], (char)0x7b)) { assert(false); } - if (!fsm_addedge_any(nfa, states[12], states[23])) { assert(false); } - if (!fsm_addedge_any(nfa, states[12], states[96])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[12], states[0], (char)0x91)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[12], states[63], (char)0xc9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[12], states[19], (char)0x77)) { assert(false); } - if (!fsm_addedge_any(nfa, states[12], states[30])) { assert(false); } - if (!fsm_addedge_any(nfa, states[13], states[99])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[13], states[81], (char)0xad)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[13], states[79])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[13], states[67], (char)0xdc)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[13], states[18], (char)0x79)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[13], states[39], (char)0xd7)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[13], states[7], (char)0x37)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[13], states[59])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[13], states[20], (char)0xd4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[13], states[144], (char)0xa9)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[13], states[52])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[13], states[97], (char)0x08)) { assert(false); } - if (!fsm_addedge_any(nfa, states[14], states[36])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[14], states[83], (char)0x08)) { assert(false); } - if (!fsm_addedge_any(nfa, states[15], states[8])) { assert(false); } - if (!fsm_addedge_any(nfa, states[15], states[81])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[15], states[99], (char)0x02)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[15], states[38], (char)0xf3)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[15], states[6], (char)0x18)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[15], states[50])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[15], states[109], (char)0xe6)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[15], states[65], (char)0x3e)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[17], states[117])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[17], states[11])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[17], states[134], (char)0x09)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[17], states[18], (char)0xb4)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[17], states[35])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[17], states[53], (char)0x22)) { assert(false); } - if (!fsm_addedge_any(nfa, states[17], states[11])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[17], states[64], (char)0x9a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[17], states[135], (char)0xf8)) { assert(false); } - if (!fsm_addedge_any(nfa, states[17], states[39])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[17], states[148])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[17], states[94], (char)0xe1)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[17], states[36], (char)0x2c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[17], states[11], (char)0x8a)) { assert(false); } - if (!fsm_addedge_any(nfa, states[18], states[19])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[19], states[51], (char)0x6d)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[19], states[51], (char)0x6a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[19], states[93], (char)0xd8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[19], states[37], (char)0xeb)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[19], states[60], (char)0x1c)) { assert(false); } - if (!fsm_addedge_any(nfa, states[19], states[11])) { assert(false); } - if (!fsm_addedge_any(nfa, states[19], states[10])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[19], states[141], (char)0x82)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[19], states[31], (char)0x7e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[19], states[60], (char)0xc1)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[19], states[21])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[19], states[88], (char)0x20)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[20], states[53], (char)0xed)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[20], states[48], (char)0x5c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[20], states[25], (char)0xea)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[20], states[4], (char)0x65)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[21], states[45])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[22], states[94])) { assert(false); } - if (!fsm_addedge_any(nfa, states[22], states[8])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[22], states[7], (char)0x4f)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[23], states[61], (char)0x92)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[23], states[31])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[23], states[93], (char)0x84)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[23], states[36])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[23], states[88])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[24], states[73], (char)0x2e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[25], states[26], (char)0x21)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[25], states[90], (char)0xef)) { assert(false); } - if (!fsm_addedge_any(nfa, states[25], states[149])) { assert(false); } - if (!fsm_addedge_any(nfa, states[25], states[64])) { assert(false); } - if (!fsm_addedge_any(nfa, states[26], states[28])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[26], states[65], (char)0xa4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[27], states[135], (char)0x79)) { assert(false); } - if (!fsm_addedge_any(nfa, states[27], states[98])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[27], states[28], (char)0x2c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[27], states[122], (char)0x2e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[27], states[24], (char)0xd5)) { assert(false); } - if (!fsm_addedge_any(nfa, states[27], states[124])) { assert(false); } - if (!fsm_addedge_any(nfa, states[27], states[47])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[27], states[139], (char)0x9d)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[27], states[152], (char)0xf7)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[28], states[28], (char)0x71)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[28], states[14], (char)0x2d)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[28], states[45], (char)0xb3)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[28], states[10], (char)0xba)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[28], states[51])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[28], states[138], (char)0xfc)) { assert(false); } - if (!fsm_addedge_any(nfa, states[29], states[105])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[29], states[29])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[29], states[12], (char)0xf8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[30], states[58], (char)0x84)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[30], states[1], (char)0x71)) { assert(false); } - if (!fsm_addedge_any(nfa, states[30], states[151])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[31], states[38], (char)0xfc)) { assert(false); } - if (!fsm_addedge_any(nfa, states[31], states[22])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[32], states[37])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[32], (char)0xc5)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[28], (char)0x53)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[32], states[12])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[39], (char)0x19)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[106], (char)0xa9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[21], (char)0xf8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[146], (char)0x95)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[73], (char)0x9b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[97], (char)0x12)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[28], (char)0xa0)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[32], states[15])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[32], states[18], (char)0xbb)) { assert(false); } - if (!fsm_addedge_any(nfa, states[33], states[127])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[33], states[1], (char)0xbf)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[34], states[132], (char)0x9a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[34], states[48])) { assert(false); } - if (!fsm_addedge_any(nfa, states[34], states[59])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[34], states[1])) { assert(false); } - if (!fsm_addedge_any(nfa, states[34], states[4])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[34], states[65], (char)0xb9)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[34], states[7])) { assert(false); } - if (!fsm_addedge_any(nfa, states[34], states[113])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[35], states[59], (char)0x29)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[35], states[105])) { assert(false); } - if (!fsm_addedge_any(nfa, states[35], states[11])) { assert(false); } - if (!fsm_addedge_any(nfa, states[35], states[24])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[35], states[133], (char)0xdf)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[35], states[66], (char)0x99)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[35], states[90])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[36], states[51])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[36], states[9])) { assert(false); } - if (!fsm_addedge_any(nfa, states[36], states[147])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[36], states[58], (char)0xf0)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[36], states[10])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[36], states[51], (char)0x94)) { assert(false); } - if (!fsm_addedge_any(nfa, states[36], states[109])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[36], states[12], (char)0x83)) { assert(false); } - if (!fsm_addedge_any(nfa, states[36], states[29])) { assert(false); } - if (!fsm_addedge_any(nfa, states[36], states[36])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[36], states[88], (char)0x63)) { assert(false); } - if (!fsm_addedge_any(nfa, states[36], states[13])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[39], states[116], (char)0x6b)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[39], states[95])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[39], states[54], (char)0xd9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[39], states[11], (char)0x77)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[40], states[22], (char)0x19)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[40], states[7], (char)0x09)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[40], states[43])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[41], states[9])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[41], states[45], (char)0xed)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[41], states[91])) { assert(false); } - if (!fsm_addedge_any(nfa, states[41], states[49])) { assert(false); } - if (!fsm_addedge_any(nfa, states[41], states[35])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[41], states[49])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[41], states[32])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[41], states[134], (char)0x90)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[41], states[84])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[41], states[126])) { assert(false); } - if (!fsm_addedge_any(nfa, states[41], states[89])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[41], states[24])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[41], states[123], (char)0x95)) { assert(false); } - if (!fsm_addedge_any(nfa, states[42], states[74])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[42], states[50])) { assert(false); } - if (!fsm_addedge_any(nfa, states[42], states[96])) { assert(false); } - if (!fsm_addedge_any(nfa, states[42], states[98])) { assert(false); } - if (!fsm_addedge_any(nfa, states[42], states[17])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[42], states[17], (char)0x5c)) { assert(false); } - if (!fsm_addedge_any(nfa, states[42], states[60])) { assert(false); } - if (!fsm_addedge_any(nfa, states[43], states[100])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[43], states[87], (char)0xf8)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[43], states[26])) { assert(false); } - if (!fsm_addedge_any(nfa, states[43], states[0])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[43], states[35], (char)0x06)) { assert(false); } - if (!fsm_addedge_any(nfa, states[43], states[69])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[43], states[102], (char)0xee)) { assert(false); } - if (!fsm_addedge_any(nfa, states[43], states[11])) { assert(false); } - if (!fsm_addedge_any(nfa, states[43], states[48])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[43], states[77], (char)0xed)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[43], states[3])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[44], states[74])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[44], states[6], (char)0x7d)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[44], states[49])) { assert(false); } - if (!fsm_addedge_any(nfa, states[45], states[134])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[45], states[31], (char)0x67)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[45], states[59])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[45], states[73])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[45], states[60], (char)0xec)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[45], states[106], (char)0x0b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[45], states[27], (char)0xfb)) { assert(false); } - if (!fsm_addedge_any(nfa, states[45], states[125])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[45], states[126], (char)0x57)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[45], states[139], (char)0xc3)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[45], states[52], (char)0x5a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[45], states[111])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[45], states[107], (char)0x82)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[46], states[143])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[46], states[7])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[46], states[86])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[46], states[69], (char)0x40)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[46], states[8], (char)0xe4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[46], states[99], (char)0x54)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[46], states[60], (char)0x0d)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[46], states[73])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[47], states[145])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[47], states[44], (char)0x88)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[47], states[6], (char)0x0d)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[47], states[104])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[47], states[98])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[47], states[28], (char)0xcd)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[47], states[94])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[47], states[3], (char)0xe2)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[47], states[5], (char)0x1a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[47], states[22])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[47], states[14], (char)0x50)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[47], states[138])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[47], states[95], (char)0x4b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[48], states[41], (char)0x8b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[49], states[31], (char)0x53)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[49], states[61])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[49], states[97], (char)0x04)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[50], states[100], (char)0x7c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[50], states[83], (char)0xe7)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[50], states[147], (char)0x4a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[50], states[103])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[50], states[30], (char)0xe1)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[50], states[46], (char)0xd9)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[50], states[45])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[50], states[40], (char)0xd4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[52], states[10], (char)0xf2)) { assert(false); } - if (!fsm_addedge_any(nfa, states[52], states[35])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[52], states[65], (char)0x0c)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[52], states[4])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[52], states[68])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[52], states[114], (char)0xd7)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[52], states[67])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[52], states[152], (char)0xd1)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[52], states[48], (char)0x7b)) { assert(false); } - if (!fsm_addedge_any(nfa, states[52], states[30])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[52], states[90], (char)0x42)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[52], states[37])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[52], states[51], (char)0x3b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[52], states[54], (char)0xf4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[53], states[29], (char)0x38)) { assert(false); } - if (!fsm_addedge_any(nfa, states[53], states[4])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[53], states[15], (char)0x65)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[53], states[9])) { assert(false); } - if (!fsm_addedge_any(nfa, states[53], states[128])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[53], states[114])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[53], states[107])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[53], states[49], (char)0x16)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[53], states[27], (char)0x96)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[53], states[115], (char)0x04)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[54], states[3], (char)0x48)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[54], states[14])) { assert(false); } - if (!fsm_addedge_any(nfa, states[54], states[104])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[54], states[132], (char)0xb6)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[54], states[44], (char)0xb2)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[54], states[127], (char)0x67)) { assert(false); } - if (!fsm_addedge_any(nfa, states[54], states[136])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[54], states[6], (char)0x07)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[54], states[135], (char)0xe2)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[55], states[38], (char)0xa9)) { assert(false); } - if (!fsm_addedge_any(nfa, states[55], states[1])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[55], states[16], (char)0x38)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[55], states[4])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[55], states[115])) { assert(false); } - if (!fsm_addedge_any(nfa, states[55], states[13])) { assert(false); } - if (!fsm_addedge_any(nfa, states[55], states[60])) { assert(false); } - if (!fsm_addedge_any(nfa, states[55], states[3])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[56], states[14])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[56], states[54], (char)0xb9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[56], states[96], (char)0xa4)) { assert(false); } - if (!fsm_addedge_any(nfa, states[56], states[119])) { assert(false); } - if (!fsm_addedge_any(nfa, states[56], states[57])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[56], states[25], (char)0xa7)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[56], states[23], (char)0xc5)) { assert(false); } - if (!fsm_addedge_any(nfa, states[57], states[145])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[58], states[46])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[58], states[127])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[58], states[60], (char)0x7c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[58], states[4], (char)0x89)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[59], states[22], (char)0xbc)) { assert(false); } - if (!fsm_addedge_any(nfa, states[59], states[24])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[59], states[16], (char)0x52)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[59], states[25], (char)0xee)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[59], states[67])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[59], states[27], (char)0x21)) { assert(false); } - if (!fsm_addedge_any(nfa, states[59], states[53])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[59], states[41], (char)0xa8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[59], states[35], (char)0x09)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[59], states[7], (char)0xb8)) { assert(false); } - if (!fsm_addedge_any(nfa, states[59], states[25])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[59], states[88])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[59], states[31], (char)0xec)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[59], states[66], (char)0x26)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[60], states[27], (char)0x38)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[60], states[140])) { assert(false); } - if (!fsm_addedge_any(nfa, states[60], states[71])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[61], states[52])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[61], states[63])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[61], states[56], (char)0xa5)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[61], states[105])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[61], states[41], (char)0x55)) { assert(false); } - if (!fsm_addedge_any(nfa, states[62], states[119])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[62], states[39])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[62], states[140])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[62], states[2], (char)0x42)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[62], states[129], (char)0xcd)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[62], states[39])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[63], states[33], (char)0x2f)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[63], states[126], (char)0xa9)) { assert(false); } - if (!fsm_addedge_any(nfa, states[63], states[31])) { assert(false); } - if (!fsm_addedge_any(nfa, states[63], states[143])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[63], states[50], (char)0xb6)) { assert(false); } - if (!fsm_addedge_any(nfa, states[63], states[43])) { assert(false); } - if (!fsm_addedge_any(nfa, states[63], states[43])) { assert(false); } - if (!fsm_addedge_any(nfa, states[63], states[11])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[63], states[8], (char)0xcb)) { assert(false); } - if (!fsm_addedge_any(nfa, states[63], states[23])) { assert(false); } - if (!fsm_addedge_any(nfa, states[63], states[40])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[63], states[21], (char)0xaf)) { assert(false); } - if (!fsm_addedge_any(nfa, states[63], states[127])) { assert(false); } - if (!fsm_addedge_any(nfa, states[63], states[60])) { assert(false); } - if (!fsm_addedge_any(nfa, states[65], states[40])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[65], states[115], (char)0x2e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[65], states[25], (char)0xf4)) { assert(false); } - if (!fsm_addedge_any(nfa, states[66], states[105])) { assert(false); } - if (!fsm_addedge_any(nfa, states[66], states[47])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[66], states[96], (char)0xa3)) { assert(false); } - if (!fsm_addedge_any(nfa, states[66], states[93])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[66], states[118])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[66], states[140], (char)0x60)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[66], states[33], (char)0xa1)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[66], states[40], (char)0xb8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[66], states[12], (char)0xb0)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[66], states[23], (char)0x00)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[67], states[2])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[68], states[32], (char)0x00)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[68], states[38], (char)0x59)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[68], states[52], (char)0x5e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[68], states[73], (char)0xe0)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[68], states[136])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[69], states[139], (char)0x3e)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[69], states[3])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[69], states[41], (char)0xfe)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[69], states[10], (char)0xf5)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[69], states[48], (char)0x18)) { assert(false); } - if (!fsm_addedge_any(nfa, states[69], states[99])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[69], states[54])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[69], states[53], (char)0xc1)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[69], states[55])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[69], states[19])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[70], states[9], (char)0x3c)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[70], states[33])) { assert(false); } - if (!fsm_addedge_any(nfa, states[70], states[32])) { assert(false); } - if (!fsm_addedge_any(nfa, states[70], states[12])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[70], states[69], (char)0x1c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[70], states[113], (char)0x42)) { assert(false); } - if (!fsm_addedge_any(nfa, states[70], states[16])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[71], states[136], (char)0x74)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[71], states[144])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[71], states[62])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[71], states[105], (char)0x0d)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[72], states[38], (char)0xb6)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[72], states[58], (char)0x81)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[72], states[9])) { assert(false); } - if (!fsm_addedge_any(nfa, states[72], states[136])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[72], states[130], (char)0x22)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[72], states[27])) { assert(false); } - if (!fsm_addedge_any(nfa, states[73], states[52])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[73], states[23], (char)0x13)) { assert(false); } - if (!fsm_addedge_any(nfa, states[73], states[9])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[73], states[145])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[73], states[33])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[73], states[139], (char)0x6a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[73], states[42])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[73], states[59], (char)0xdd)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[74], states[29], (char)0x8a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[75], states[68])) { assert(false); } - if (!fsm_addedge_any(nfa, states[75], states[134])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[75], states[57], (char)0x81)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[75], states[41])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[75], states[50], (char)0x53)) { assert(false); } - if (!fsm_addedge_any(nfa, states[75], states[45])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[75], states[110])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[75], states[35])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[75], states[43], (char)0x8a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[75], states[11], (char)0x4c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[75], states[74], (char)0xfc)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[75], states[5], (char)0x32)) { assert(false); } - if (!fsm_addedge_any(nfa, states[76], states[83])) { assert(false); } - if (!fsm_addedge_any(nfa, states[76], states[21])) { assert(false); } - if (!fsm_addedge_any(nfa, states[76], states[26])) { assert(false); } - if (!fsm_addedge_any(nfa, states[76], states[21])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[77], states[25], (char)0xce)) { assert(false); } - if (!fsm_addedge_any(nfa, states[77], states[54])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[77], states[25])) { assert(false); } - if (!fsm_addedge_any(nfa, states[77], states[57])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[77], states[0], (char)0x73)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[77], states[18])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[77], states[0], (char)0xc1)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[77], states[47])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[77], states[90], (char)0x93)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[78], states[45], (char)0x1c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[78], states[19], (char)0x6a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[78], states[21], (char)0xaa)) { assert(false); } - if (!fsm_addedge_any(nfa, states[78], states[120])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[79], states[39])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[79], states[5], (char)0xa9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[79], states[31], (char)0x7a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[79], states[48])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[79], states[130], (char)0xae)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[79], states[37], (char)0xab)) { assert(false); } - if (!fsm_addedge_any(nfa, states[81], states[141])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[81], states[18])) { assert(false); } - if (!fsm_addedge_any(nfa, states[81], states[6])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[81], states[41], (char)0xeb)) { assert(false); } - if (!fsm_addedge_any(nfa, states[82], states[29])) { assert(false); } - if (!fsm_addedge_any(nfa, states[82], states[49])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[82], states[20], (char)0x8b)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[82], states[31])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[82], states[147], (char)0x14)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[82], states[1])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[82], states[51])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[82], states[74], (char)0x69)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[82], states[45], (char)0x15)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[82], states[22])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[82], states[15])) { assert(false); } - if (!fsm_addedge_any(nfa, states[82], states[65])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[82], states[132])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[82], states[82])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[83], states[3])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[83], states[105], (char)0x91)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[83], states[111])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[83], states[44])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[83], states[85])) { assert(false); } - if (!fsm_addedge_any(nfa, states[83], states[41])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[84], states[114], (char)0x34)) { assert(false); } - if (!fsm_addedge_any(nfa, states[84], states[54])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[84], states[85], (char)0x54)) { assert(false); } - if (!fsm_addedge_any(nfa, states[84], states[18])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[84], states[109], (char)0xfd)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[84], states[49])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[84], states[50])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[84], states[27])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[84], states[125], (char)0xf9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[84], states[61], (char)0xf4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[84], states[75], (char)0x89)) { assert(false); } - if (!fsm_addedge_any(nfa, states[85], states[148])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[85], states[59])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[85], states[30])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[85], states[139], (char)0xd2)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[85], states[46], (char)0x60)) { assert(false); } - if (!fsm_addedge_any(nfa, states[85], states[149])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[86], states[7], (char)0x12)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[86], states[55], (char)0xe4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[86], states[120], (char)0x9a)) { assert(false); } - if (!fsm_addedge_any(nfa, states[86], states[25])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[86], states[54], (char)0x18)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[86], states[70])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[86], states[40])) { assert(false); } - if (!fsm_addedge_any(nfa, states[86], states[73])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[86], states[135], (char)0x06)) { assert(false); } - if (!fsm_addedge_any(nfa, states[86], states[50])) { assert(false); } - if (!fsm_addedge_any(nfa, states[86], states[45])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[86], states[60])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[86], states[47], (char)0x3f)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[86], states[47])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[87], states[120])) { assert(false); } - if (!fsm_addedge_any(nfa, states[87], states[79])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[87], states[8], (char)0xe9)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[87], states[16])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[87], states[33], (char)0xb7)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[87], states[103], (char)0xc5)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[87], states[10], (char)0x68)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[87], states[126], (char)0x8c)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[87], states[114])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[88], states[15], (char)0x19)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[88], states[43], (char)0x95)) { assert(false); } - if (!fsm_addedge_any(nfa, states[88], states[15])) { assert(false); } - if (!fsm_addedge_any(nfa, states[88], states[3])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[89], states[140], (char)0x8c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[89], states[130], (char)0x82)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[89], states[103])) { assert(false); } - if (!fsm_addedge_any(nfa, states[89], states[135])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[89], states[108], (char)0xef)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[89], states[1])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[89], states[128], (char)0xaa)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[89], states[120])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[89], states[16], (char)0xfd)) { assert(false); } - if (!fsm_addedge_any(nfa, states[89], states[70])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[89], states[30], (char)0xfa)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[89], states[60], (char)0xc6)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[90], states[22], (char)0xec)) { assert(false); } - if (!fsm_addedge_any(nfa, states[90], states[33])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[90], states[107], (char)0xe2)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[91], states[16], (char)0xc1)) { assert(false); } - if (!fsm_addedge_any(nfa, states[91], states[18])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[91], states[90], (char)0x15)) { assert(false); } - if (!fsm_addedge_any(nfa, states[91], states[0])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[91], states[46])) { assert(false); } - if (!fsm_addedge_any(nfa, states[92], states[139])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[93], states[64], (char)0x14)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[93], states[53])) { assert(false); } - if (!fsm_addedge_any(nfa, states[93], states[13])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[93], states[13], (char)0xfa)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[93], states[14], (char)0x59)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[93], states[71], (char)0xfd)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[93], states[133], (char)0xf8)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[93], states[39])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[93], states[101], (char)0x6a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[93], states[104], (char)0x7a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[93], states[62], (char)0x67)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[93], states[13])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[94], states[16], (char)0xc7)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[95], states[88])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[95], states[44])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[95], states[46], (char)0x21)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[95], states[106], (char)0x6e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[95], states[139], (char)0x41)) { assert(false); } - if (!fsm_addedge_any(nfa, states[95], states[23])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[95], states[65])) { assert(false); } - if (!fsm_addedge_any(nfa, states[95], states[19])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[95], states[94])) { assert(false); } - if (!fsm_addedge_any(nfa, states[96], states[62])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[96], states[43], (char)0x11)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[96], states[40], (char)0x6f)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[96], states[10], (char)0xb6)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[96], states[26], (char)0x7b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[96], states[130], (char)0x3b)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[96], states[78])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[96], states[143])) { assert(false); } - if (!fsm_addedge_any(nfa, states[96], states[51])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[96], states[25], (char)0xc3)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[96], states[126])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[96], states[77])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[96], states[105])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[97], states[89], (char)0x1c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[97], states[42], (char)0x5b)) { assert(false); } - if (!fsm_addedge_any(nfa, states[97], states[129])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[97], states[94], (char)0x95)) { assert(false); } - if (!fsm_addedge_any(nfa, states[97], states[38])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[97], states[14], (char)0x6f)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[97], states[69], (char)0xa8)) { assert(false); } - if (!fsm_addedge_any(nfa, states[97], states[99])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[97], states[140], (char)0xe6)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[97], states[8])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[97], states[120], (char)0xa1)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[97], states[95], (char)0x67)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[97], states[118], (char)0xcf)) { assert(false); } - if (!fsm_addedge_any(nfa, states[98], states[115])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[98], states[148], (char)0x1c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[98], states[23], (char)0x29)) { assert(false); } - if (!fsm_addedge_any(nfa, states[98], states[0])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[98], states[84], (char)0x0b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[98], states[38], (char)0x8a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[98], states[125], (char)0xad)) { assert(false); } - if (!fsm_addedge_any(nfa, states[98], states[27])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[99], states[45], (char)0xa9)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[99], states[29])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[99], states[50], (char)0xdd)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[99], states[33], (char)0x96)) { assert(false); } - if (!fsm_addedge_any(nfa, states[99], states[120])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[99], states[101])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[99], states[87])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[99], states[6])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[99], states[81], (char)0xbf)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[99], states[9], (char)0x8a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[100], states[151])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[100], states[14], (char)0x0c)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[100], states[89])) { assert(false); } - if (!fsm_addedge_any(nfa, states[100], states[151])) { assert(false); } - if (!fsm_addedge_any(nfa, states[100], states[38])) { assert(false); } - if (!fsm_addedge_any(nfa, states[100], states[60])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[101], states[38], (char)0x96)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[101], states[150], (char)0x3a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[101], states[21], (char)0xb1)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[101], states[13])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[101], states[22], (char)0xe7)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[101], states[66], (char)0xea)) { assert(false); } - if (!fsm_addedge_any(nfa, states[103], states[78])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[103], states[57], (char)0xad)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[104], states[141], (char)0xee)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[104], states[10], (char)0x74)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[105], states[18], (char)0x71)) { assert(false); } - if (!fsm_addedge_any(nfa, states[105], states[49])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[106], states[127], (char)0x32)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[106], states[109], (char)0xa8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[107], states[45], (char)0x36)) { assert(false); } - if (!fsm_addedge_any(nfa, states[107], states[72])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[107], states[58], (char)0x33)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[108], states[21], (char)0xe6)) { assert(false); } - if (!fsm_addedge_any(nfa, states[108], states[57])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[108], states[44])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[108], states[12], (char)0x6d)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[108], states[77])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[108], states[54])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[108], states[116], (char)0x81)) { assert(false); } - if (!fsm_addedge_any(nfa, states[108], states[36])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[108], states[88], (char)0x3e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[108], states[28], (char)0x6e)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[108], states[0], (char)0x9a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[110], states[94])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[110], states[81], (char)0x9a)) { assert(false); } - if (!fsm_addedge_any(nfa, states[110], states[51])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[110], states[61], (char)0x4c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[110], states[34], (char)0xe4)) { assert(false); } - if (!fsm_addedge_any(nfa, states[110], states[10])) { assert(false); } - if (!fsm_addedge_any(nfa, states[111], states[75])) { assert(false); } - if (!fsm_addedge_any(nfa, states[111], states[111])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[111], states[16], (char)0x31)) { assert(false); } - if (!fsm_addedge_any(nfa, states[111], states[14])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[111], states[51], (char)0x29)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[111], states[119])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[111], states[115], (char)0xf1)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[111], states[4], (char)0xb7)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[111], states[67])) { assert(false); } - if (!fsm_addedge_any(nfa, states[112], states[58])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[112], states[1], (char)0xad)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[112], states[16], (char)0x57)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[112], states[8], (char)0x38)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[112], states[111], (char)0x11)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[112], states[8], (char)0xcd)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[112], states[59])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[112], states[9], (char)0x6f)) { assert(false); } - if (!fsm_addedge_any(nfa, states[112], states[48])) { assert(false); } - if (!fsm_addedge_any(nfa, states[112], states[29])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[112], states[152], (char)0x24)) { assert(false); } - if (!fsm_addedge_any(nfa, states[112], states[13])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[112], states[47], (char)0x0c)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[112], states[57])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[113], states[28], (char)0x32)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[113], states[1], (char)0x7b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[113], states[99], (char)0x10)) { assert(false); } - if (!fsm_addedge_any(nfa, states[113], states[59])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[115], states[110], (char)0x2e)) { assert(false); } - if (!fsm_addedge_any(nfa, states[115], states[93])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[115], states[37])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[115], states[143], (char)0x3a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[115], states[22], (char)0x41)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[115], states[126])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[115], states[24], (char)0xa8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[115], states[56], (char)0x4c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[116], states[35], (char)0xce)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[116], states[68])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[116], states[148], (char)0xe2)) { assert(false); } - if (!fsm_addedge_any(nfa, states[116], states[104])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[116], states[45], (char)0x05)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[116], states[126], (char)0xc3)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[116], states[146], (char)0x47)) { assert(false); } - if (!fsm_addedge_any(nfa, states[116], states[34])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[117], states[60], (char)0xbb)) { assert(false); } - if (!fsm_addedge_any(nfa, states[117], states[107])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[117], states[9], (char)0x53)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[117], states[111], (char)0x8e)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[117], states[145])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[117], states[14], (char)0xf6)) { assert(false); } - if (!fsm_addedge_any(nfa, states[117], states[132])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[117], states[15], (char)0x39)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[117], states[60], (char)0xb4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[117], states[24], (char)0x8a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[117], states[51], (char)0xf2)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[117], states[22], (char)0x25)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[118], states[2], (char)0x48)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[118], states[11], (char)0xef)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[118], states[18], (char)0x2a)) { assert(false); } - if (!fsm_addedge_any(nfa, states[118], states[8])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[118], states[73], (char)0xce)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[118], states[150], (char)0x5a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[118], states[52])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[118], states[136])) { assert(false); } - if (!fsm_addedge_any(nfa, states[120], states[9])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[120], states[73], (char)0xac)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[120], states[28], (char)0x8d)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[120], states[34], (char)0xbc)) { assert(false); } - if (!fsm_addedge_any(nfa, states[120], states[4])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[120], states[20])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[120], states[48], (char)0xeb)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[120], states[138], (char)0xf8)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[121], states[18])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[121], states[6], (char)0xbc)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[122], states[23], (char)0xa9)) { assert(false); } - if (!fsm_addedge_any(nfa, states[122], states[51])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[122], states[54], (char)0x17)) { assert(false); } - if (!fsm_addedge_any(nfa, states[123], states[55])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[124], states[71], (char)0x87)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[124], states[38], (char)0x84)) { assert(false); } - if (!fsm_addedge_any(nfa, states[124], states[135])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[124], states[46], (char)0x09)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[124], states[42], (char)0xf8)) { assert(false); } - if (!fsm_addedge_any(nfa, states[125], states[142])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[125], states[151], (char)0x22)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[125], states[64], (char)0x1a)) { assert(false); } - if (!fsm_addedge_any(nfa, states[125], states[135])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[125], states[127])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[125], states[29], (char)0x59)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[125], states[39], (char)0x4a)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[125], states[37])) { assert(false); } - if (!fsm_addedge_any(nfa, states[125], states[26])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[126], states[35], (char)0x0d)) { assert(false); } - if (!fsm_addedge_any(nfa, states[126], states[54])) { assert(false); } - if (!fsm_addedge_any(nfa, states[127], states[46])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[127], states[13])) { assert(false); } - if (!fsm_addedge_any(nfa, states[127], states[16])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[127], states[1])) { assert(false); } - if (!fsm_addedge_any(nfa, states[127], states[86])) { assert(false); } - if (!fsm_addedge_any(nfa, states[127], states[20])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[127], states[72])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[127], states[16], (char)0x70)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[127], states[35], (char)0x3d)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[127], states[41])) { assert(false); } - if (!fsm_addedge_any(nfa, states[127], states[115])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[127], states[14], (char)0xe8)) { assert(false); } - if (!fsm_addedge_any(nfa, states[127], states[90])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[127], states[104])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[128], states[72], (char)0xe2)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[128], states[12])) { assert(false); } - if (!fsm_addedge_any(nfa, states[128], states[29])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[128], states[118], (char)0xa8)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[128], states[24], (char)0xbb)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[128], states[92], (char)0xf9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[128], states[124], (char)0x1a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[128], states[110], (char)0x9c)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[128], states[33], (char)0x03)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[128], states[8])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[128], states[57])) { assert(false); } - if (!fsm_addedge_any(nfa, states[129], states[79])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[129], states[39], (char)0xe1)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[129], states[65], (char)0x91)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[129], states[39], (char)0x57)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[129], states[0], (char)0xa0)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[129], states[36])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[129], states[117], (char)0xb6)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[129], states[118], (char)0x05)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[129], states[47], (char)0x38)) { assert(false); } - if (!fsm_addedge_any(nfa, states[129], states[145])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[129], states[22])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[129], states[33], (char)0x63)) { assert(false); } - if (!fsm_addedge_any(nfa, states[130], states[19])) { assert(false); } - if (!fsm_addedge_any(nfa, states[130], states[58])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[130], states[99], (char)0x86)) { assert(false); } - if (!fsm_addedge_any(nfa, states[130], states[10])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[130], states[18], (char)0x00)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[130], states[55], (char)0x46)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[130], states[35])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[130], states[13])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[130], states[29])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[130], states[37])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[130], states[40])) { assert(false); } - if (!fsm_addedge_any(nfa, states[130], states[132])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[130], states[70])) { assert(false); } - if (!fsm_addedge_any(nfa, states[131], states[94])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[131], states[2], (char)0xa9)) { assert(false); } - if (!fsm_addedge_any(nfa, states[131], states[1])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[131], states[103], (char)0xd9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[131], states[88], (char)0x8b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[131], states[3], (char)0xc3)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[131], states[84])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[132], states[22], (char)0xab)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[132], states[127], (char)0x6c)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[132], states[144])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[132], states[0])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[132], states[55])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[132], states[104], (char)0xa9)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[132], states[85])) { assert(false); } - if (!fsm_addedge_any(nfa, states[132], states[134])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[132], states[29], (char)0xd9)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[132], states[112], (char)0x84)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[132], states[40], (char)0x73)) { assert(false); } - if (!fsm_addedge_any(nfa, states[134], states[135])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[134], states[120], (char)0x9a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[134], states[130], (char)0xb3)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[135], states[54], (char)0xcd)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[135], states[5], (char)0xfd)) { assert(false); } - if (!fsm_addedge_any(nfa, states[135], states[4])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[135], states[80], (char)0x62)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[135], states[53], (char)0xc4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[135], states[31], (char)0xf3)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[135], states[57], (char)0xe3)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[136], states[45], (char)0xe8)) { assert(false); } - if (!fsm_addedge_any(nfa, states[137], states[68])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[138], states[78], (char)0x65)) { assert(false); } - if (!fsm_addedge_any(nfa, states[138], states[55])) { assert(false); } - if (!fsm_addedge_any(nfa, states[138], states[57])) { assert(false); } - if (!fsm_addedge_any(nfa, states[138], states[152])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[138], states[31], (char)0x5f)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[138], states[49])) { assert(false); } - if (!fsm_addedge_any(nfa, states[138], states[0])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[138], states[15], (char)0x6b)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[138], states[60])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[138], states[1])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[138], states[4], (char)0x00)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[138], states[102])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[139], states[33])) { assert(false); } - if (!fsm_addedge_any(nfa, states[139], states[28])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[139], states[90], (char)0x4f)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[139], states[44])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[139], states[129])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[139], states[59], (char)0x1b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[139], states[43], (char)0x0a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[139], states[76], (char)0x94)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[139], states[3], (char)0xe6)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[140], states[54])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[140], states[44], (char)0x6a)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[141], states[24], (char)0x0e)) { assert(false); } - if (!fsm_addedge_any(nfa, states[142], states[9])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[142], states[49], (char)0x82)) { assert(false); } - if (!fsm_addedge_any(nfa, states[142], states[21])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[142], states[58], (char)0xc6)) { assert(false); } - if (!fsm_addedge_any(nfa, states[142], states[116])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[142], states[37], (char)0xb5)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[142], states[84], (char)0x65)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[142], states[109], (char)0xf5)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[142], states[120], (char)0xd7)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[143], states[42], (char)0xa0)) { assert(false); } - if (!fsm_addedge_any(nfa, states[143], states[108])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[143], states[96], (char)0xf6)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[143], states[60], (char)0xc4)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[143], states[24])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[143], states[72], (char)0x5b)) { assert(false); } - if (!fsm_addedge_any(nfa, states[143], states[137])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[143], states[45], (char)0x2f)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[143], states[22])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[143], states[42], (char)0xe3)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[143], states[62])) { assert(false); } - if (!fsm_addedge_any(nfa, states[145], states[47])) { assert(false); } - if (!fsm_addedge_any(nfa, states[145], states[54])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[146], states[9])) { assert(false); } - if (!fsm_addedge_any(nfa, states[146], states[27])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[146], states[131], (char)0x41)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[146], states[40], (char)0x14)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[146], states[4], (char)0x5e)) { assert(false); } - if (!fsm_addedge_any(nfa, states[146], states[2])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[146], states[70], (char)0x2a)) { assert(false); } - if (!fsm_addedge_any(nfa, states[146], states[126])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[146], states[8])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[146], states[149], (char)0x2f)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[147], states[41], (char)0x75)) { assert(false); } - if (!fsm_addedge_any(nfa, states[147], states[9])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[147], states[15], (char)0xf4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[147], states[89], (char)0xc1)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[147], states[25], (char)0x62)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[147], states[12], (char)0x49)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[147], states[43], (char)0x96)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[147], states[142], (char)0xcb)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[147], states[17], (char)0x9f)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[148], states[51])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[148], states[36], (char)0x41)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[148], states[45])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[148], states[44], (char)0xce)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[148], states[93], (char)0x1f)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[148], states[49])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[149], states[21], (char)0xa4)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[149], states[146], (char)0xbd)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[149], states[74], (char)0x2f)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[149], states[107], (char)0x80)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[149], states[51], (char)0xd1)) { assert(false); } - if (!fsm_addedge_any(nfa, states[149], states[66])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[149], states[30])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[149], states[146], (char)0x71)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[149], states[143], (char)0xac)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[149], states[76], (char)0xa5)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[149], states[40])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[149], states[36])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[149], states[7])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[149], states[147], (char)0xc5)) { assert(false); } - if (!fsm_addedge_any(nfa, states[150], states[31])) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[150], states[18])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[150], states[89], (char)0x2b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[150], states[64], (char)0x9b)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[150], states[9], (char)0xec)) { assert(false); } - if (!fsm_addedge_any(nfa, states[150], states[48])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[150], states[111], (char)0xc7)) { assert(false); } - if (!fsm_addedge_literal(nfa, states[150], states[56], (char)0x3a)) { assert(false); } - if (!fsm_addedge_any(nfa, states[150], states[96])) { assert(false); } - if (!fsm_addedge_any(nfa, states[150], states[60])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[150], states[128], (char)0x6c)) { assert(false); } - if (!fsm_addedge_epsilon(nfa, states[152], states[17])) { assert(false); } - if (!fsm_addedge_literal(nfa, states[152], states[37], (char)0x22)) { assert(false); } - - if (-1 == gettimeofday(&pre, NULL)) { - assert(false); - return false; - } - - if (!fsm_determinise(nfa)) { - fprintf(stdout, "FAIL: determinise\n"); - return THEFT_TRIAL_ERROR; - } - - if (-1 == gettimeofday(&post, NULL)) { - assert(false); - return false; - } - - elapsed_msec = 1000 * (post.tv_sec - pre.tv_sec) - + (post.tv_usec / 1000 - pre.tv_usec / 1000); - printf("fsm_determinise: %zd msec\n", elapsed_msec); - fsm_free(nfa); - - return elapsed_msec < 2000; -} diff --git a/fuzz/fuzz_re.h b/fuzz/fuzz_re.h new file mode 100644 index 000000000..8adca4c2f --- /dev/null +++ b/fuzz/fuzz_re.h @@ -0,0 +1,22 @@ +/* + * Copyright 2017 Katherine Flavel + * + * See LICENCE for the full copyright terms. + */ + +#ifndef FUZZ_RE_H +#define FUZZ_RE_H + +bool test_re_pcre_minimize(theft_seed seed); + +bool test_re_parser_literal(uint8_t verbosity, + const uint8_t *re, size_t re_size, + size_t count, const struct string_pair *pairs); + +bool test_re_parser_pcre(uint8_t verbosity, + const uint8_t *re_string, size_t re_size, + size_t pos_count, const struct string_pair *pos_pairs, + size_t neg_count, const struct string_pair *neg_pairs); + +#endif + diff --git a/fuzz/fuzz_re_parser.c b/fuzz/fuzz_re_parser.c index 1959aed7b..04429631d 100644 --- a/fuzz/fuzz_re_parser.c +++ b/fuzz/fuzz_re_parser.c @@ -5,12 +5,10 @@ */ #include "fuzz_libfsm.h" +#include "fuzz_re.h" #include "type_info_re.h" -/* in test_re_parser_pcre.c */ -bool test_re_pcre_minimize(void); - static enum theft_trial_res prop_re(struct theft *t, void *arg1) { @@ -43,111 +41,7 @@ prop_re(struct theft *t, void *arg1) } bool -test_re_regress1(void) -{ - uint8_t high_bit[] = { 0x80, 0x00 }; - struct string_pair exp_pairs[] = { - { .size = 1, .string = high_bit } - }; - - return test_re_parser_literal(test_get_verbosity(), - high_bit, 1, 1, exp_pairs); -} - -bool -test_re_regress2(void) -{ - uint8_t eff_eff[] = { 0xFF, 0x00 }; - struct string_pair exp_pairs[] = { - { .size = 1, .string = eff_eff } - }; - - return test_re_parser_literal(test_get_verbosity(), - eff_eff, 1, 1, exp_pairs); -} - -bool -test_re_regress3(void) -{ - uint8_t re[] = { '\\', '.', '?' }; - uint8_t zero[] = { '.' }; - struct string_pair exp_pairs[] = { - { .size = 1, .string = zero } - }; - - return test_re_parser_pcre(test_get_verbosity(), - re, sizeof re, - 1, exp_pairs, - 0, NULL); -} - -bool -test_re_regress4(void) -{ - uint8_t re[] = "[\\(a]?"; - - uint8_t str[] = "a"; - struct string_pair exp_pairs[] = { - { .size = sizeof str, .string = str } - }; - - return test_re_parser_pcre(test_get_verbosity(), - re, sizeof re, - 1, exp_pairs, - 0, NULL); -} - -bool -test_re_regress5(void) -{ - uint8_t re[] = ".*[\0a]"; - - uint8_t str[] = "\0\0"; - struct string_pair exp_pairs[] = { - { .size = sizeof str, .string = str } - }; - - return test_re_parser_pcre(0, - re, sizeof re, - 1, exp_pairs, - 0, NULL); -} - -// seed = 0xe86963e7ad089564LLU; -bool -test_re_regress6(void) -{ - uint8_t re[] = { '[', 0x01, - '\\', '\\', ']', - ']' }; - uint8_t str[] = { 0x01, ']'}; - struct string_pair exp_pairs[] = { - { .size = sizeof str, .string = str } - }; - - return test_re_parser_pcre(0, - re, sizeof re, - 1, exp_pairs, - 0, NULL); -} - -bool -test_re_regress_aBx(void) -{ - uint8_t re[] = "[aBx]*a"; - uint8_t str[] = "aBxa"; - struct string_pair exp_pairs[] = { - { .size = strlen((char *) str), .string = str } - }; - - return test_re_parser_pcre(0, - re, strlen((char *) re), - 1, exp_pairs, - 0, NULL); -} - -bool -test_re_parser(uintptr_t arg) +test_re_parser(theft_seed seed, uintptr_t arg) { struct theft_type_info arg_info; enum theft_run_res res; @@ -182,7 +76,7 @@ test_re_parser(uintptr_t arg) .env = &env, }, - .seed = theft_seed_of_time(), + .seed = seed, .fork = { .enable = false, } @@ -199,15 +93,6 @@ test_re_parser(uintptr_t arg) void register_test_re(void) { - reg_test("re_regress1", test_re_regress1); - reg_test("re_regress2", test_re_regress2); - reg_test("re_regress3", test_re_regress3); - reg_test("re_regress4", test_re_regress4); - reg_test("re_regress5", test_re_regress5); - reg_test("re_regress6", test_re_regress6); - - reg_test("re_regress_aBx", test_re_regress_aBx); - reg_test1("re_parser_literal", test_re_parser, RE_LITERAL); reg_test1("re_parser_pcre", test_re_parser, RE_PCRE); reg_test("re_pcre_minimize", test_re_pcre_minimize); diff --git a/fuzz/fuzz_re_parser_literal.c b/fuzz/fuzz_re_parser_literal.c index 50b0d6076..3b9a8341f 100644 --- a/fuzz/fuzz_re_parser_literal.c +++ b/fuzz/fuzz_re_parser_literal.c @@ -5,6 +5,7 @@ */ #include "fuzz_libfsm.h" +#include "fuzz_re.h" #include "type_info_re.h" diff --git a/fuzz/fuzz_re_parser_pcre.c b/fuzz/fuzz_re_parser_pcre.c index a9c3153a9..a44ef9dcb 100644 --- a/fuzz/fuzz_re_parser_pcre.c +++ b/fuzz/fuzz_re_parser_pcre.c @@ -5,6 +5,7 @@ */ #include "fuzz_libfsm.h" +#include "fuzz_re.h" #include "type_info_re.h" @@ -139,7 +140,7 @@ test_re_parser_pcre(uint8_t verbosity, } bool -test_re_pcre_minimize(void) +test_re_pcre_minimize(theft_seed seed) { struct theft_type_info arg_info; enum theft_run_res res; @@ -159,7 +160,7 @@ test_re_pcre_minimize(void) .trial_post = trial_post_inc_verbosity, .env = &env, }, - .seed = theft_seed_of_time(), + .seed = seed, .fork = { .enable = false, } diff --git a/fuzz/main.c b/fuzz/main.c index 116618655..8a6e19d6e 100644 --- a/fuzz/main.c +++ b/fuzz/main.c @@ -9,6 +9,11 @@ #include #include +#include +#include +#include +#include + #include #include "type_info_fsm_literal.h" @@ -58,11 +63,40 @@ usage(const char *exec_name) " -v: increase verbosity\n" " -l: list tests by name\n" " -f: halt after first failure\n" - " -n : only run tests STRING in the name\n", + " -n : only run tests STRING in the name\n" + " -s : fuzz from the given seed\n", exec_name); exit(1); } +static theft_seed +parse_seed(const char *s) +{ + unsigned long long u; + char *e; + + errno = 0; + + u = strtoull(s, &e, 16); + if (u == ULLONG_MAX && errno != 0) { + perror(optarg); + exit(1); + } + + /* XXX: assumes theft_seed is uint64_t */ + if (u > UINT64_MAX) { + fprintf(stderr, "seed out of range\n"); + exit(1); + } + + if (s[0] == '\0' || *e != '\0') { + fprintf(stderr, "invalid seed\n"); + exit(1); + } + + return u; +} + void reg_test(const char *name, test_fun *test) { @@ -120,16 +154,20 @@ int main(int argc, char **argv) { struct test_link *link; + theft_seed seed; + + seed = theft_seed_of_time(); { int c; - while (c = getopt(argc, argv, "hvfln:"), c != -1) { + while (c = getopt(argc, argv, "hvfln:s:"), c != -1) { switch (c) { case 'v': state.verbosity++; break; case 'l': state.list = true; break; case 'f': state.first_fail = true; break; case 'n': state.filter = optarg; break; + case 's': seed = parse_seed(optarg); break; case 'h': case '?': @@ -178,8 +216,8 @@ main(int argc, char **argv) pass = false; switch (link->type) { - case TEST0: pass = link->u.test0.fun(); break; - case TEST1: pass = link->u.test1.fun(link->u.test1.arg); break; + case TEST0: pass = link->u.test0.fun(seed); break; + case TEST1: pass = link->u.test1.fun(seed, link->u.test1.arg); break; default: assert(false); diff --git a/fuzz/type_info_nfa.c b/fuzz/type_info_nfa.c index a30115ec0..2d1b65cd2 100644 --- a/fuzz/type_info_nfa.c +++ b/fuzz/type_info_nfa.c @@ -257,6 +257,7 @@ const struct theft_type_info type_info_nfa = { const char * nfa_op_name(enum nfa_op op) { +fprintf(stderr, "nfa_op %u\n", op); switch (op) { case NFA_OP_NOP: return "NOP"; case NFA_OP_MINIMISE: return "MINIMISE"; diff --git a/include/adt/priq.h b/include/adt/priq.h index fb391e43f..a5e88ec29 100644 --- a/include/adt/priq.h +++ b/include/adt/priq.h @@ -32,9 +32,6 @@ struct priq * priq_push(struct priq **priq, struct fsm_state *state, unsigned int cost); -/* - * Update cost of node in priq. - */ void priq_update(struct priq **priq, struct priq *s, unsigned int cost); diff --git a/src/adt/priq.c b/src/adt/priq.c index 70fd9b4c1..13a86a921 100644 --- a/src/adt/priq.c +++ b/src/adt/priq.c @@ -34,30 +34,51 @@ priq_pop(struct priq **priq) void priq_update(struct priq **priq, struct priq *s, unsigned int cost) { - struct priq **p, **pp; + struct priq **p; +#if 0 + struct priq *next; +#endif - pp = NULL; - for (p = priq; *p != NULL; p = &(*p)->next) { - if ((*p) == s) { - break; + assert(priq != NULL); + assert(s != NULL); + +#if 0 + p = priq; + + while (*p != NULL) { + if (*p == s) { + *p = (*p)->next; + continue; + } + + if ((*p)->cost >= cost) { + next = *p; + *p = s; + p = &next->next; + continue; } - pp = p; - } - if (!pp) { - return; + p = &(*p)->next; } - (*pp)->next = s->next; + s->next = next; +#endif - for (pp = priq; *pp != NULL; pp = &(*pp)->next) { - if ((*pp)->cost >= cost) { + for (p = priq; *p != NULL; p = &(*p)->next) { + if (*p == s) { + *p = (*p)->next; + break; + } + } + + for (p = priq; *p != NULL; p = &(*p)->next) { + if ((*p)->cost >= cost) { break; } } - s->next = *pp; - *pp = s; + s->next = *p; + *p = s; } struct priq * diff --git a/tests/minimise/in21.fsm b/tests/minimise/in21.fsm new file mode 100644 index 000000000..28ac09b9f --- /dev/null +++ b/tests/minimise/in21.fsm @@ -0,0 +1,12 @@ +# +# Copyright 2008-2017 Katherine Flavel +# +# See LICENCE for the full copyright terms. +# + +0 -> 0 ?; +1 -> 1 ?; + +start: 0; +end: 1; + diff --git a/tests/minimise/out21.fsm b/tests/minimise/out21.fsm new file mode 100644 index 000000000..ece1345c4 --- /dev/null +++ b/tests/minimise/out21.fsm @@ -0,0 +1,8 @@ +# +# Copyright 2008-2017 Katherine Flavel +# +# See LICENCE for the full copyright terms. +# + +start: 0; + diff --git a/tests/pcre/Makefile b/tests/pcre/Makefile new file mode 100755 index 000000000..2633c2ce8 --- /dev/null +++ b/tests/pcre/Makefile @@ -0,0 +1,38 @@ +.include "../../share/mk/top.mk" + +TEST.tests/pcre != ls -1 tests/pcre/out*.fsm +TEST_SRCDIR.tests/pcre = tests/pcre +TEST_OUTDIR.tests/pcre = ${BUILD}/tests/pcre + +RE=${BUILD}/bin/re + +.for n in ${TEST.tests/pcre:T:R:C/^out//} + +${TEST_OUTDIR.tests/pcre}/got${n}.fsm: ${TEST_SRCDIR.tests/pcre}/in${n}.re + ${RE} -r pcre -py ${.ALLSRC:M*.re} \ + > $@ + +${TEST_OUTDIR.tests/pcre}/nfa${n}.fsm: ${TEST_SRCDIR.tests/pcre}/in${n}.re + ${RE} -r pcre -n -py ${.ALLSRC:M*.re} \ + > $@ + +${TEST_OUTDIR.tests/pcre}/res${n}: \ + ${TEST_SRCDIR.tests/pcre}/out${n}.fsm \ + ${TEST_OUTDIR.tests/pcre}/got${n}.fsm + +FSMTEST_RESULT += ${TEST_OUTDIR.tests/pcre}/res${n} + +.endfor + +.for n in ${TEST.tests/pcre:T:R:C/^out//} + +${TEST_OUTDIR.tests/pcre}/nfa${n}.png: ${TEST_OUTDIR.tests/pcre}/nfa${n}.fsm +${TEST_OUTDIR.tests/pcre}/out${n}.png: ${TEST_SRCDIR.tests/pcre}/out${n}.fsm +${TEST_OUTDIR.tests/pcre}/got${n}.png: ${TEST_OUTDIR.tests/pcre}/got${n}.fsm + +.for img in nfa${n} out${n} got${n} +FSMTEST_IMG += ${TEST_OUTDIR.tests/pcre}/${img}.png +.endfor + +.endfor + diff --git a/tests/pcre/in0.re b/tests/pcre/in0.re new file mode 100644 index 000000000..b5fc603be --- /dev/null +++ b/tests/pcre/in0.re @@ -0,0 +1 @@ +[aBx]*a \ No newline at end of file diff --git a/tests/pcre/in1.re b/tests/pcre/in1.re new file mode 100644 index 000000000..5416677bc --- /dev/null +++ b/tests/pcre/in1.re @@ -0,0 +1 @@ +€ \ No newline at end of file diff --git a/tests/pcre/in2.re b/tests/pcre/in2.re new file mode 100644 index 000000000..ce542efaa --- /dev/null +++ b/tests/pcre/in2.re @@ -0,0 +1 @@ +ÿ \ No newline at end of file diff --git a/tests/pcre/in3.re b/tests/pcre/in3.re new file mode 100644 index 000000000..b48dda824 --- /dev/null +++ b/tests/pcre/in3.re @@ -0,0 +1 @@ +\.? \ No newline at end of file diff --git a/tests/pcre/in4.re b/tests/pcre/in4.re new file mode 100644 index 000000000..07fc620fe --- /dev/null +++ b/tests/pcre/in4.re @@ -0,0 +1 @@ +[\(a]? \ No newline at end of file diff --git a/tests/pcre/in5.re b/tests/pcre/in5.re new file mode 100644 index 000000000..b7f065e8d Binary files /dev/null and b/tests/pcre/in5.re differ diff --git a/tests/pcre/in6.re b/tests/pcre/in6.re new file mode 100644 index 000000000..ea26421d5 --- /dev/null +++ b/tests/pcre/in6.re @@ -0,0 +1 @@ +[\\]] \ No newline at end of file diff --git a/tests/pcre/out0.fsm b/tests/pcre/out0.fsm new file mode 100644 index 000000000..8cbda9836 --- /dev/null +++ b/tests/pcre/out0.fsm @@ -0,0 +1,18 @@ +# +# Copyright 2008-2017 Katherine Flavel +# +# See LICENCE for the full copyright terms. +# + +0 -> 1 'a'; +0 -> 1 'B'; +0 -> 1 'x'; + +0 -> 1; +1 -> 0; + +1 -> 2 'a'; + +start: 0; +end: 2; + diff --git a/tests/pcre/out1.fsm b/tests/pcre/out1.fsm new file mode 100644 index 000000000..cbd0866e3 --- /dev/null +++ b/tests/pcre/out1.fsm @@ -0,0 +1,11 @@ +# +# Copyright 2008-2017 Katherine Flavel +# +# See LICENCE for the full copyright terms. +# + +0 -> 1 "\x80"; + +start: 0; +end: 1; + diff --git a/tests/pcre/out2.fsm b/tests/pcre/out2.fsm new file mode 100644 index 000000000..859ea59ab --- /dev/null +++ b/tests/pcre/out2.fsm @@ -0,0 +1,11 @@ +# +# Copyright 2008-2017 Katherine Flavel +# +# See LICENCE for the full copyright terms. +# + +0 -> 1 "\xff"; + +start: 0; +end: 1; + diff --git a/tests/pcre/out3.fsm b/tests/pcre/out3.fsm new file mode 100644 index 000000000..5e88db1a0 --- /dev/null +++ b/tests/pcre/out3.fsm @@ -0,0 +1,12 @@ +# +# Copyright 2008-2017 Katherine Flavel +# +# See LICENCE for the full copyright terms. +# + +0 -> 1 '.'; +0 -> 1; + +start: 0; +end: 1; + diff --git a/tests/pcre/out4.fsm b/tests/pcre/out4.fsm new file mode 100644 index 000000000..cde2e250b --- /dev/null +++ b/tests/pcre/out4.fsm @@ -0,0 +1,13 @@ +# +# Copyright 2008-2017 Katherine Flavel +# +# See LICENCE for the full copyright terms. +# + +0 -> 1 '('; +0 -> 1 'a'; +0 -> 1; + +start: 0; +end: 1; + diff --git a/tests/pcre/out5.fsm b/tests/pcre/out5.fsm new file mode 100644 index 000000000..7d5d19d4a --- /dev/null +++ b/tests/pcre/out5.fsm @@ -0,0 +1,16 @@ +# +# Copyright 2008-2017 Katherine Flavel +# +# See LICENCE for the full copyright terms. +# + +0 -> 1 ?; +0 -> 1; +1 -> 0; + +1 -> 2 "\x00"; +1 -> 2 'a'; + +start: 0; +end: 2; + diff --git a/tests/pcre/out6.fsm b/tests/pcre/out6.fsm new file mode 100644 index 000000000..a93b5ef50 --- /dev/null +++ b/tests/pcre/out6.fsm @@ -0,0 +1,13 @@ +# +# Copyright 2008-2017 Katherine Flavel +# +# See LICENCE for the full copyright terms. +# + +0 -> 1 "\x01"; +0 -> 1 '\'; +1 -> 2 ']'; + +start: 0; +end: 2; +