Skip to main content

Module active

Module active 

Source
Expand description

Active regular-language inference from membership and equivalence queries.

This module implements Angluin’s L* observation-table learner for regular languages. It is intentionally opt-in: positive-only CFG inference does not depend on this path. Exact equivalence can be supplied by a caller-provided oracle; when only membership is available, the provided adapters use a deterministic bounded sampler as an approximate equivalence oracle.

Structs§

ActiveLearningConfig
Learner and approximate-equivalence configuration.
Dfa
Deterministic finite automaton learned by L*.
GrammarAcceptorOracle
Active-learning oracle backed by a runtime GrammarParser.
ParserMembershipOracle
Active-learning oracle backed by a ParserRegistry parser.
SamplingEquivalenceOracle
Membership-plus-sampling oracle backed by an in-process predicate.

Enums§

ActiveLearningError
Error returned by active-learning entry points.

Traits§

Oracle
Minimally adequate teacher for active regular-language learning.

Functions§

clean_structural_acceptance
Default parser acceptance predicate.
learn_dfa
Learns a DFA via L* against oracle.
learn_grammar
Learns a DFA via L* and lowers it to a right-linear grammar.

Type Aliases§

ParserAcceptancePredicate
Predicate used by ParserMembershipOracle to decide parser acceptance.
Symbol
Input symbol consumed by the active learner.