ISoLA & AISoLA 2026

International Symposium on Leveraging Applications of Formal Methods, Verification, and Validation • Kos, Greece

Talk

Weighted Automata in LearnLib: Learning, Testing and Minimization (WiP)

Time: Friday, 23.10

Room: Room 3

Authors: Rick Konders

Abstract: Weighted automata extend the theory of automata by adding weights (typically numbers) to transitions and outputs. When reading an input word, the automaton multiplies all weights along a run, and sums over all runs, obtaining a final acceptance weight. This definition works generically over any semi-ring. Two primary examples are: • Using the Boolean semi-ring 𝔹 (with conjunction and disjunction), the classical notion of nondeterministic automata is obtained. • Using the field of real numbers ℝ, one can model probabilistic models such as hidden Markov models. We implemented interfaces and classes for computing with weighted automata, generic over the semi-ring. We implement a learning algorithm [1], an equivalence oracle based on a generalised W-method [2], and minimisation [3]. Existing LearnLib interfaces are used, when possible. In particular, the automata implement SuffixOutput, the learning algorithm implements LearningAlgorithm, and the equivalence oracle implements AbstractTestWordEQOracle. We were not able to reuse the transition system classes of AutomataLib, since we were unable to add weights. The complexity of these algorithms depends on the semi-ring. In particular, we need to be able to solve systems of equations. For fields, this is standard linear algebra and can be done efficiently. We have performed some preliminary experiments on automata recognizing the language Σ*aΣ^n for Σ = {a, b}, which can be recognized by unambiguous NFAs or exponentially larger DFAs [4]. (Every unambiguous NFA can be considered as a WFA over a field, which improves the complexity of most decision problems.) We see that our generalised W-method test suite is smaller than the W-method for the corresponding DFA, similar to how learning with NL* is more efficient that learning with L* (see table 1). In these experiments, the first counterexample we give is a^{n+1}, and use lookahead k = 2.