The forgex_nfa_m
module defines the data structure of NFA.
The nfa_t
is defined as a class representing NFA.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | public | :: | alloc_count_b | = | ALLOC_COUNT_INITTIAL | ||
integer(kind=int32), | public | :: | alloc_count_f | = | ALLOC_COUNT_INITTIAL | ||
type(nfa_transition_t), | public, | allocatable | :: | backward(:) | |||
integer(kind=int32), | public | :: | backward_top | = | 0 | ||
type(nfa_transition_t), | public, | allocatable | :: | forward(:) | |||
integer(kind=int32), | public | :: | forward_top | = | 0 | ||
integer(kind=int32), | public | :: | own_i |
procedure, public :: add_transition => nfa__add_transition | |
procedure, public :: merge_segments => nfa__merge_segments_of_transition | |
procedure, public :: realloc_b => nfa__reallocate_transition_backward | |
procedure, public :: realloc_f => nfa__reallocate_transition_forward |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(segment_t), | public, | allocatable | :: | c(:) | |||
integer(kind=int32), | public | :: | c_top | = | 0 | ||
integer(kind=int32), | public | :: | dst | = | NFA_NULL_TRANSITION | ||
logical, | public | :: | is_registered | = | .false. | ||
integer(kind=int32), | public | :: | own_j | = | NFA_NULL_TRANSITION |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | nfa_top | |||
type(nfa_state_node_t), | intent(in) | :: | nfa_graph(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tree_t), | intent(in) | :: | tree | |||
type(nfa_state_node_t), | intent(inout), | allocatable | :: | nfa(:) | ||
integer(kind=int32), | intent(inout) | :: | nfa_entry | |||
integer(kind=int32), | intent(inout) | :: | nfa_exit | |||
integer(kind=int32), | intent(inout) | :: | nfa_top | |||
type(segment_t), | intent(inout), | allocatable | :: | all_segments(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_node_t), | intent(inout) | :: | graph(:) | |||
integer, | intent(in) | :: | nfa_top | |||
type(segment_t), | intent(inout), | allocatable | :: | seg_list(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tree_t), | intent(in) | :: | tree | |||
integer(kind=int32), | intent(in) | :: | idx | |||
type(nfa_state_node_t), | intent(inout), | allocatable | :: | nfa_graph(:) | ||
integer(kind=int32), | intent(inout) | :: | nfa_top | |||
integer(kind=int32), | intent(in) | :: | entry | |||
integer(kind=int32), | intent(in) | :: | exit |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(inout) | :: | nfa_top |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_node_t), | intent(inout), | allocatable | :: | nfa(:) |
This subroutine updates the NFA state transitions by disjoining the segments.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_transition_t), | intent(inout) | :: | transition | |||
type(segment_t), | intent(in) | :: | seg_list(:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tree_t), | intent(in) | :: | tree | |||
integer(kind=int32), | intent(in) | :: | idx | |||
type(nfa_state_node_t), | intent(inout), | allocatable | :: | nfa_graph(:) | ||
integer(kind=int32), | intent(inout) | :: | nfa_top | |||
integer(kind=int32), | intent(in) | :: | entry | |||
integer(kind=int32), | intent(in) | :: | exit |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tree_t), | intent(in) | :: | tree | |||
integer(kind=int32), | intent(in) | :: | idx | |||
type(nfa_state_node_t), | intent(inout), | allocatable | :: | nfa_graph(:) | ||
integer(kind=int32), | intent(inout) | :: | nfa_top | |||
integer(kind=int32), | intent(in) | :: | entry | |||
integer(kind=int32), | intent(in) | :: | exit |
Note that the return value of the size function on an unallocated array is undefined.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nfa_state_node_t), | intent(inout) | :: | self | |||
type(nfa_state_node_t), | intent(inout) | :: | nfa_graph(:) | |||
integer(kind=int32), | intent(in) | :: | src | |||
integer(kind=int32), | intent(in) | :: | dst | |||
type(segment_t), | intent(in) | :: | c |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nfa_state_node_t), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nfa_state_node_t), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nfa_state_node_t), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_state_node_t), | intent(inout), | allocatable | :: | nfa_graph(:) |
Update c_top, which has become outdated by disjoin, to new information.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(nfa_transition_t), | intent(inout) | :: | transition |