forgex_nfa_m
module defines a derived-type which is the set of NFA nodes.
nfa_state_set_t
represents a set of NFA nodes for the power set construction method.
The nfa_state_set_t
type represents set of NFA states.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public, | allocatable | :: | vec(:) |
This function checks if the arguement 'state' (set of NFA state) includes state 's'.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_set_t), | intent(in) | :: | state_set | |||
integer(kind=int32), | intent(in) | :: | state_index |
This function determines if two NFA state sets (logical vectors) are equivalent.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_set_t), | intent(in) | :: | a | |||
type(nfa_state_set_t), | intent(in) | :: | b |
This subroutine adds a specified state (s
) to an NFA state set state_set
by setting the corresponding element in state%vec
to true.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_set_t), | intent(inout) | :: | state_set | |||
integer(kind=int32), | intent(in) | :: | s |
This subroutine collects all states reachable by empty transition starting from a given state set in an NFA.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_node_t), | intent(in) | :: | nfa_graph(:) | |||
integer(kind=int32), | intent(in) | :: | nfa_top | |||
type(nfa_state_set_t), | intent(inout) | :: | nfa_set |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_set_t), | intent(inout) | :: | state_set | |||
integer(kind=int32), | intent(in) | :: | ntop |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_set_t), | intent(in) | :: | set | |||
integer(kind=int32), | intent(in) | :: | top | |||
integer(kind=int32), | intent(in) | :: | uni |
This subroutine recursively marks empty transitions from a given NFA state index.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_node_t), | intent(in) | :: | nfa_graph(NFA_STATE_BASE:NFA_STATE_LIMIT) | |||
integer(kind=int32), | intent(in) | :: | nfa_top | |||
type(nfa_state_set_t), | intent(inout) | :: | nfa_set | |||
integer(kind=int32), | intent(in) | :: | nfa_i |