TaPAS
0.2
|
Typedefs | |
typedef struct sataf_sa_st | sataf_sa |
Type for the data structure encoding Shared Automata. | |
Functions | |
sataf_sa * | sataf_sa_create_one (uint32_t alphabet_size) |
Create the unique SA recognizing all words on an alphabet of size alphabet_size. More... | |
sataf_sa * | sataf_sa_create_zero (uint32_t alphabet_size) |
Create the unique SA recognizing no words on an alphabet of size alphabet_size. More... | |
static sataf_sa * | sataf_sa_add_reference (sataf_sa *sa) |
Add one the counter of references to sa. More... | |
static void | sataf_sa_del_reference (sataf_sa *sa) |
Decrement the number of references to sa. More... | |
sataf_sa * | sataf_sa_find_or_add (sataf_ea *ea, sataf_sa **bind_sa, uint32_t *bind_init) |
Look-up in the SA-unicity-table for a shared automaton defined by ea and the binding function (bind_sa, bind_init). More... | |
void | sataf_sa_display_as_dot (sataf_sa *sa, ccl_log_type log, int marked_state, const char **alphabet, int with_info) |
Display the shared automaton sa in DOT file format. More... | |
void | sataf_sa_display_scc_as_dot (sataf_sa *sa, ccl_log_type log) |
Display the graph of SCCs composing the shared automaton sa. More... | |
static int | sataf_sa_is_zero (sataf_sa *sa) |
Return if sa is the shared automaton accepting no word. More... | |
static uint32_t | sataf_sa_get_alphabet_size (sataf_sa *sa) |
Return the size of the alphabet. More... | |
static int | sataf_sa_is_one (sataf_sa *sa) |
Return if sa is the shared automaton accepting any word. More... | |
static int | sataf_sa_is_zero_or_one (sataf_sa *sa) |
Check if sa accepts nothing or accepts nothing. More... | |
void | sataf_sa_table_statistics (ccl_log_type log) |
Display internal statistics about the use of SAs. In particular informations related to the unicity table. More... | |
Add one the counter of references to sa.
sa | the shared automaton |
sataf_sa* sataf_sa_create_one | ( | uint32_t | alphabet_size | ) |
Create the unique SA recognizing all words on an alphabet of size alphabet_size.
alphabet_size | the size of the alphabet. |
sataf_sa* sataf_sa_create_zero | ( | uint32_t | alphabet_size | ) |
Create the unique SA recognizing no words on an alphabet of size alphabet_size.
alphabet_size | the size of the alphabet. |
|
inlinestatic |
Decrement the number of references to sa.
When this counter falls to zero the resources allocated to sa are freed.
sa | the shared automaton |
void sataf_sa_display_as_dot | ( | sataf_sa * | sa, |
ccl_log_type | log, | ||
int | marked_state, | ||
const char ** | alphabet, | ||
int | with_info | ||
) |
Display the shared automaton sa in DOT file format.
Each node represents a state of the represented automaton sa i.e. without exit states. Each node is labelled with:
A state (typically an initial state) marked_state of the top-level shared automaton sa can be distinguished using different color. If marked_state is negative then all states are displayed in white.
sa | the displayed SA |
log | the CCL output stream |
marked_state | a differenciated state |
alphabet | an array of strings used as letters. |
void sataf_sa_display_scc_as_dot | ( | sataf_sa * | sa, |
ccl_log_type | log | ||
) |
Display the graph of SCCs composing the shared automaton sa.
Each node displayed in the graph represents a SA. Edge between nodes are labelled by integers. An edge indicates there exists an entry in the binding function of yielding into the state i of .
sa | the displayed SA |
log | the CCL output stream |
Look-up in the SA-unicity-table for a shared automaton defined by ea and the binding function (bind_sa, bind_init).
The library maintains a unicity table for shared automata. This function looks up in this table for a shared automaton binding each couple of (bind_sa[i], bind_init[i]) to the exit state i of ea.
ea | the exit automaton of the SA |
bind_sa | the SAs associated to exit states of ea |
bind_init | the initial states associated to exit states of ea |
|
inlinestatic |
Return the size of the alphabet.
sa | the considered shared automaton |
|
inlinestatic |
Return if sa is the shared automaton accepting any word.
sa | the shared automaton |
|
inlinestatic |
Return if sa is the shared automaton accepting no word.
sa | the shared automaton |
|
inlinestatic |
Check if sa accepts nothing or accepts nothing.
sa | the shared automaton |
void sataf_sa_table_statistics | ( | ccl_log_type | log | ) |
Display internal statistics about the use of SAs. In particular informations related to the unicity table.
log | the CCL ouptut stream |