Mescal
|
Separation by group languages. More...
#include "graphs_tarjan.h"
#include "nfa.h"
#include "nfa_intersec.h"
#include "printing.h"
#include "type_dlist.h"
#include "type_partitions.h"
#include "flint/fmpz.h"
#include "flint/fmpz_mat.h"
#include <stdbool.h>
#include <stdlib.h>
Go to the source code of this file.
Classes | |
struct | num_span_forest |
Type used to store the information needed to solve AMT-separation on the SCCs of a dgraph. More... | |
Functions | |
bool | solve_system_amt (fmpz_mat_t MAT, int *target, uint nb_rows, uint nb_cols) |
num_span_forest * | compute_span_forest (dgraph *G, parti *sccs, bool *allowed) |
Computes a spanning forest from a dgraph. | |
void | delete_span_forest (num_span_forest *forest) |
Deletes the structure used to store the spanning forest. | |
parti * | dgraph_amt_fold (dgraph *g, parti *sccs) |
Computes the folding of a dgraph according to the AMT-separation. | |
void | compute_amt_kernel_regular (morphism *, bool *, uint *) |
Computes the regular elements of the AMT-kernel in a morphism (non-regular elements are ignored). | |
void | build_hnf_matrix_two (dgraph *g1, dgraph *g2, num_span_forest *span1, num_span_forest *span2, uint q1, uint q2, fmpz_mat_t MAT) |
void | compute_amt_pairs_regular (morphism *M, num_span_forest *rspan, num_span_forest *lspan, uint e, uint f, dequeue *first, dequeue *second) |
Computes the anti AMT-pairs (q,t) where q is in the R-class of e and t is in the L-class of f. | |
parti * | dgraph_stal_fold (dgraph *G, parti *sccs, basis ba) |
Computes the Stalling partition obtained from a dgraph. | |
dgraph * | shrink_mod (dgraph *g, parti *fold, parti *sccs) |
Computes the graph obtained by folding a right or left Cayley graph according to the Stalling partition. Modulo mode: the alphabet is reduced to a single letter. | |
dgraph * | shrink_mod_mirror (dgraph *g, parti *fold, parti *sccs) |
Computes the graph obtained by folding a right or left Cayley graph according to the Stalling partition. Modulo mode: the alphabet is reduced to a single letter. Mirror mode: the transitions are reversed. | |
dgraph * | shrink_grp (dgraph *g, parti *fold, parti *sccs) |
Computes the graph obtained by folding a right or left Cayley graph according to the Stalling partition. Group mode: the alphabet is preserved. | |
dgraph * | shrink_grp_mirror (dgraph *g, parti *fold, parti *sccs) |
Computes the graph obtained by folding a right or left Cayley graph according to the Stalling partition. Group mode: the alphabet is preserved. Mirror mode: the transitions are reversed. | |
dgraph * | dgraph_implement_fold (dgraph *g, parti *sccs, parti *fold) |
Folds a single SCC of a dgraph according to a folding partition generated from MOD, AMT or GR. | |
dfa * | dfa_compute_folding (dfa *A, basis ba) |
parti * | nfa_inv_ext (nfa *) |
Computation of the inverse transitions inside the SCCs of an NFA. | |
void | nfa_remove_inv (nfa *) |
Remove all inverse transitions in an NFA. | |
parti * | nfa_stal_fold (nfa *, parti *) |
Computation of the partition obtained by the Stallings folding in SCCs. | |
nfa * | nfa_dyck_ext (nfa *, parti *) |
Computation of the NFA used in the group separation algorithm by adding epsilon transitions between pairs of states connected by a word in the Dyck language. | |
bool | decid_grp_sep (nfa *, nfa *, bool, FILE *) |
GR-separation. | |
nfa * | nfa_proj_unary (nfa *) |
Projection of a NFA over a one-letter alphabet. | |
bool | decid_mod_sep (nfa *, nfa *, bool, FILE *) |
MOD-separation. | |
bool | decid_st_sep (nfa *, nfa *, FILE *) |
ST-separation. | |
Separation by group languages.
void compute_amt_kernel_regular | ( | morphism * | M, |
bool * | mono_in_sub, | ||
uint * | size ) |
Computes the regular elements of the AMT-kernel in a morphism (non-regular elements are ignored).
M | The morphism. |
mono_in_sub | The array to fill with the elements of the kernel. |
size | Used to return the size of the kernel. |
void compute_amt_pairs_regular | ( | morphism * | M, |
num_span_forest * | rspan, | ||
num_span_forest * | lspan, | ||
uint | e, | ||
uint | f, | ||
dequeue * | first, | ||
dequeue * | second ) |
Computes the anti AMT-pairs (q,t) where q is in the R-class of e and t is in the L-class of f.
M | The morphism. |
rspan | The spanning forest of the R-classes |
lspan | The spanning forest of the L-classes |
e | The idempotent e. |
f | The idempotent f. |
first | The dequeue to fill with the first elements of each anti-pair. |
second | The dequeue to fill with the second elements of each anti-pair. |
num_span_forest * compute_span_forest | ( | dgraph * | G, |
parti * | sccs, | ||
bool * | allowed ) |
Computes a spanning forest from a dgraph.
G | The dgraph |
sccs | The partition into SCCs of the states (can be NULL). |
allowed | Array of booleans indexed by the states. If allowed[q] is true, the state q is allowed to be a root of a tree in the spanning forest. Can be NULL, in which case all states are allowed to be roots of the trees in the spanning forest. Only considered when sccs is not NULL. |
GR-separation.
NULL
pointer should be given if no display is wanted. It is possible to ask for details on the computation using the Boolean.I1 | First NFA. |
I2 | Second NFA. |
details | Should further details be displayed? |
out | The stream. |
MOD-separation.
NULL
pointer should be given if no display is wanted. It is possible to ask for details on the computation using the Boolean.I1 | First NFA. |
I2 | Second NFA. |
details | Should further details be displayed? |
out | The stream. |
ST-separation.
NULL
pointer should be given if no display is wanted.I1 | First NFA. |
I2 | Second NFA. |
out | The stream. |
void delete_span_forest | ( | num_span_forest * | forest | ) |
Deletes the structure used to store the spanning forest.
forest | The structure to delete. |
A | The DFA to fold. |
ba | The basis mode (ST, MOD, AMT or GR). |
Computes the folding of a dgraph according to the AMT-separation.
g | The dgraph to fold. |
sccs | The partition into SCCs of the states (can be NULL). |
Folds a single SCC of a dgraph according to a folding partition generated from MOD, AMT or GR.
g | The dgraph to fold. |
sccs | The partition into SCCs of the states. |
fold | The partition to use for the fold. |
Computes the Stalling partition obtained from a dgraph.
UINT_MAX
.G | The graph to fold. |
sccs | The partition into SCCs of the states. |
ba | The basis mode (ST, MOD, AMT or GR). |
Computation of the NFA used in the group separation algorithm by adding epsilon transitions between pairs of states connected by a word in the Dyck language.
A | The NFA (inverse transitions must be computed). |
FOLD | The partition corresponding to the folding of the SCCs. |
Computation of the inverse transitions inside the SCCs of an NFA.
A | The NFA. |
Projection of a NFA over a one-letter alphabet.
A | The NFA. |
void nfa_remove_inv | ( | nfa * | A | ) |
Remove all inverse transitions in an NFA.
A | The NFA. |
Computation of the partition obtained by the Stallings folding in SCCs.
A | The NFA (inverse transitions must be computed). |
sccs | The partition into SCCs of the states. |
Computes the graph obtained by folding a right or left Cayley graph according to the Stalling partition. Group mode: the alphabet is preserved.
UINT_MAX
.g | The graph to fold (right or left Cayley graph of a morphism). |
fold | The stalling partition. |
sccs | The partition into SCCs of the states (R-classes or L-classes). |
Computes the graph obtained by folding a right or left Cayley graph according to the Stalling partition. Group mode: the alphabet is preserved. Mirror mode: the transitions are reversed.
UINT_MAX
.g | The graph to fold (right or left Cayley graph of a morphism). |
fold | The stalling partition. |
sccs | The partition into SCCs of the states (R-classes or L-classes). |
Computes the graph obtained by folding a right or left Cayley graph according to the Stalling partition. Modulo mode: the alphabet is reduced to a single letter.
UINT_MAX
.g | The graph to fold (right or left Cayley graph of a morphism). |
fold | The stalling partition. |
sccs | The partition into SCCs of the states (R-classes or L-classes). |
Computes the graph obtained by folding a right or left Cayley graph according to the Stalling partition. Modulo mode: the alphabet is reduced to a single letter. Mirror mode: the transitions are reversed.
UINT_MAX
.g | The graph to fold (right or left Cayley graph of a morphism). |
fold | The stalling partition. |
sccs | The partition into SCCs of the states (R-classes or L-classes). |