Intf.TThe module type shared by both encoding strategies (naive and gen).
An encoding accumulates SMT variables and constraints that, when satisfiable, yield a WFA consistent with all membership observations seen so far. This is the getAutomaton abstraction of Definition 5 in the paper: given a set of (word, value) pairs, produce a system of SMT constraints whose solutions correspond to WFAs of the current hypothesis size.
The two implementations are:
Encoding.Naive: encodes WFA semantics directly (Section 4.1).Encoding.Gen: encodes the state-language / O-witness characterisation (Section 4.2, Figure 1).Opaque encoding state: holds all SMT variables and accumulated constraint batches for the current hypothesis size.
val mk : alpha:Automata.Char.set -> states:Base.int -> tmk ~alpha ~states creates a fresh encoding for a WFA with states states over alphabet alpha. Allocates all SMT variables and emits domain constraints (from Semiring.T.SMT.mk) but no observation constraints yet.
val add : t -> s Automata.Word.map -> tadd enc obs incorporates a new batch of membership observations (word, value) into the encoding. Returns an updated t with new SMT variables (if the gen encoding needs additional generator symbols) and a new constraint batch appended. Pure: enc is not mutated.
val get : t -> Smtml.Expr.t Base.listget enc returns only the constraints added by the most recent call to add. Used in incremental solving mode (--inc) to push only new assertions onto the solver stack via SMT.add.
val all : t -> Smtml.Expr.t Base.listall enc returns the full conjunction of all constraints accumulated since mk. Used in non-incremental mode: the entire system is re-asserted on each SMT.check call.