Class: Gisele::Compiling::Gts
- Inherits:
-
Stamina::Automaton
- Object
- Stamina::Automaton
- Gisele::Compiling::Gts
- Defined in:
- lib/gisele/compiling/gts.rb
Defined Under Namespace
Classes: Equivalence
Instance Method Summary collapse
Instance Method Details
#bytecode_equivalent!(other) ⇒ Object
35 36 37 38 |
# File 'lib/gisele/compiling/gts.rb', line 35 def bytecode_equivalent!(other) raise "Not DFA equivalent" unless Equivalence.new.call(self, other) true end |
#to_dot ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/gisele/compiling/gts.rb', line 16 def to_dot dotter = lambda{|elm,kind| case kind when :automaton { :rankdir => "LR" } when :state { :label => state_label(elm), :shape => state_shape(elm), :fixedsize => "true", :width => "0.6", :style => "filled", :fillcolor => state_color(elm) } when :edge { :label => edge_label(elm) } end } super(false, &dotter) end |