diff options
Diffstat (limited to 'src/stats.c')
| -rw-r--r-- | src/stats.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/stats.c b/src/stats.c new file mode 100644 index 0000000..91f98bd --- /dev/null +++ b/src/stats.c | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | // stats.c --- print statistics about the FSM | ||
| 2 | #include <stdlib.h> | ||
| 3 | #include <stdio.h> | ||
| 4 | #include "fsm.h" | ||
| 5 | #include "utils.h" | ||
| 6 | |||
| 7 | int | ||
| 8 | main (int argc, char *argv[]) | ||
| 9 | { | ||
| 10 | UNUSED (argc); | ||
| 11 | UNUSED (argv); | ||
| 12 | |||
| 13 | printf (" INITIAL_STATE: %5d\n", INITIAL_STATE); | ||
| 14 | printf (" STATE_COUNT: %5d\n", STATE_COUNT); | ||
| 15 | printf (" FINAL_STATE_COUNT: %5d\n", FINAL_STATE_COUNT); | ||
| 16 | printf (" ALPHABET_SYMBOL_COUNT: %5d\n", ALPHABET_SYMBOL_COUNT); | ||
| 17 | printf ("sizeof state_transition_table: %5lu\n", sizeof (state_transition_table)); | ||
| 18 | printf ("sizeof set_of_final_states: %5lu\n", sizeof (set_of_final_states)); | ||
| 19 | printf ("sizeof bitarray_of_final_states: %5lu\n", sizeof (bitarray_of_final_states)); | ||
| 20 | printf ("sizeof fsm: %5lu\n", sizeof (state_transition_table) + | ||
| 21 | sizeof (set_of_final_states) + | ||
| 22 | sizeof (bitarray_of_final_states)); | ||
| 23 | return EXIT_SUCCESS; | ||
| 24 | } | ||
| 25 | // stats.c ends here | ||
