Module Teacher.Make

Parameters

Signature

type s = S.t
type t
val mk : Automata.Char.set -> (Automata.Word.t -> s) -> Base.int -> t

mk alpha lang bound creates a teacher. lang is the target weighted language (a word-to-semiring function). bound is the maximum number of words to enumerate during equivalence checking. All calls to lang are transparently memoised.

val mem : t -> Automata.Word.t -> s

Membership query: mem t w returns f(w), the target value for w.

val equiv : t -> a -> Automata.Word.t Base.option

Equivalence query: equiv t aut enumerates words of Σ* in breadth-first order up to bound words and returns the first w such that aut(w) ≠ f(w), or None if no counterexample is found within the bound.

val alpha : t -> Automata.Char.set
val stats : t -> stats
val show_stats : t -> Base.string
val reset_stats : t -> Base.unit

Reset per-round statistics counters (called after each round).