Skip to content

Learning Deterministic Systems

Edi Muškardin edited this page Dec 3, 2024 · 10 revisions

The following are the most important aspects of deterministic automata learning that the user can change. Most users can simply use the default values of the run_Lstar method with the appropriate automaton_type value. automaton_type determines whether DFA, Mealy machine, or Moore machine will be learned.

Automaton Type

Set the parameter automaton_type to either dfa, mealy or moore to learn deterministic finite automaton, Mealy machine or Moore machine respectively.

Cache

A cache is a set of all traces observed so far. It is encoded as a tree. We use this tree/cache to check for violations of determinism and to improve runtime by not performing unnecessary membership queries. For all deterministic systems, the cache is enabled by default. We strongly suggest always leaving it enabled.

Usage of cache is important when learning non-simulated systems or systems where each step/reset is computational/time expansive. Little overhead introduced by the cache is not compatible with the speedup obtained by saving several membership queries.

When is it acceptable to disable the cache? If the system you are learning has fast step/membership queries and you are certain that it will behave deterministically.

Counterexample Processioning

AALpy offers 3 different counterexample processing options. We suggest using Riverst-Schapire counterexample processing. Users can select either None, 'rs' (Riverst-Schapire), or 'longest_prefix' (Shahbaz-Groz) as a counterexample processing strategy. If no counterexample processing is selected, then the consistency check will be used.