Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(nfa_graph_t), | intent(inout) | :: | self | |||
type(tree_t), | intent(in) | :: | tree | |||
integer(kind=int32), | intent(inout) | :: | entry_i | |||
integer(kind=int32), | intent(inout) | :: | exit_i | |||
type(cube_t), | intent(inout) | :: | entire |
pure subroutine nfa_graph__build(self, tree, entry_i, exit_i, entire) implicit none type(tree_t), intent(in) :: tree class(nfa_graph_t), intent(inout) :: self integer(int32), intent(inout) :: entry_i, exit_i type(cube_t), intent(inout) :: entire integer(int32) :: i, ib, ie ! index for states array ib = NFA_STATE_BASE ie = NFA_STATE_UNIT ! initialize self%top = 0 allocate(self%graph(ib:ie)) self%graph(ib:ie)%own_i = [(i, i=ib, ie)] self%graph(:)%alloc_count_f = 0 self%graph(:)%forward_top = 1 call self%new_nfa_node() entry_i = self%top call self%new_nfa_node() exit_i = self%top call generate_nfa(tree, tree%top, self, entry_i, exit_i) ! ~0.8ms TOO SLOW do i = 1, self%top call self%graph(i)%merge_segment() end do call self%disjoin(entire) end subroutine nfa_graph__build