Module: Lernen::Algorithm::LSharp

Defined in:
lib/lernen/algorithm/lsharp.rb,
lib/lernen/algorithm/lsharp/lsharp_learner.rb,
lib/lernen/algorithm/lsharp/observation_tree.rb

Overview

LSharp provides an implementation of L# algorithm.

L# is introduced by [Vaandrager et al. (2022) “A New Approach for Active Automata Learning Based on Apartness”](link.springer.com/chapter/10.1007/978-3-030-99524-9_12).

Defined Under Namespace

Classes: LSharpLearner, ObservationTree

Class Method Summary collapse

Class Method Details

.learn(alphabet, sul, oracle, automaton_type:, max_learning_rounds: nil) ⇒ Object

Runs the L# algorithm and returns an inferred automaton.

: [In] (

  Array[In] alphabet,
  System::SUL[In, bool] sul,
  Equiv::Oracle[In, bool] oracle,
  automaton_type: :dfa,
  ?max_learning_rounds: Integer | nil
) -> Automaton::DFA[In]

: [In, Out] (

  Array[In] alphabet,
  System::SUL[In, Out] sul,
  Equiv::Oracle[In, Out] oracle,
  automaton_type: :mealy,
  ?max_learning_rounds: Integer | nil
) -> Automaton::Mealy[In, Out]

: [In, Out] (

  Array[In] alphabet,
  System::SUL[In, Out] sul,
  Equiv::Oracle[In, Out] oracle,
  automaton_type: :moore,
  ?max_learning_rounds: Integer | nil
) -> Automaton::Moore[In, Out]


37
38
39
40
# File 'lib/lernen/algorithm/lsharp.rb', line 37

def self.learn(alphabet, sul, oracle, automaton_type:, max_learning_rounds: nil) # steep:ignore
  learner = LSharpLearner.new(alphabet, sul, automaton_type:)
  learner.learn(oracle, max_learning_rounds:)
end