Class: Lernen::System::MooreLikeSUL

Inherits:
SUL
  • Object
show all
Defined in:
lib/lernen/system/moore_like_sul.rb

Overview

MooreLikeSUL is a system under learning (SUL) for a system much like Moore machine.

By contrast to ‘SUL`, this accepts a query with the empty string additionally.

Note that this class is abstract. You should implement the following method:

  • ‘#step(input)`

  • ‘#query_empty`

Instance Method Summary collapse

Methods inherited from SUL

#query, #query_last, #setup, #shutdown, #stats, #step

Constructor Details

#initialize(cache: true) ⇒ MooreLikeSUL

: (?cache: bool) -> void



19
20
21
# File 'lib/lernen/system/moore_like_sul.rb', line 19

def initialize(cache: true)
  super
end

Instance Method Details

#query_emptyObject

Runs a membership query with the empty input.

This is an abstract method.

: () -> Out

Raises:

  • (TypeError)


28
29
30
# File 'lib/lernen/system/moore_like_sul.rb', line 28

def query_empty
  raise TypeError, "abstract method: `query_empty`"
end