Class: DFA

Inherits:
Falafel show all
Defined in:
lib/dfa.rb

Overview

DFA class

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Falafel

#build, #cfg, #compose, #dfa_to_min, new, #nfa_to_dfa, #nfa_to_reg, #potens_set, #power_set, #pump_lemma, #relation

Instance Attribute Details

#delta_starObject

Returns the value of attribute delta_star.



7
8
9
# File 'lib/dfa.rb', line 7

def delta_star
  @delta_star
end

#finalsObject

Returns the value of attribute finals.



7
8
9
# File 'lib/dfa.rb', line 7

def finals
  @finals
end

#startObject

Returns the value of attribute start.



7
8
9
# File 'lib/dfa.rb', line 7

def start
  @start
end

#statesObject

Returns the value of attribute states.



7
8
9
# File 'lib/dfa.rb', line 7

def states
  @states
end

Instance Method Details

#to_minObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/dfa.rb', line 9

def to_min
  finals = _finals
  states = _states
  r0     = _r0 finals, states
  steps  = {}

  steps['R0'] = r0
  finals_hash = _finals_hash finals, states
  steps       = _steps_builder finals, states, steps

  _print finals_hash, finals, states
  _print_steps steps
end