Skip to content

RPNI Passive Deterministic Automata Learning

Edi Muškardin edited this page Jun 19, 2024 · 5 revisions

RPNI - Passive learning of DFAs, Moore, and Mealy machines

Syntax:

((list of inputs), label)+

For example:

# Dfa example
[
((a,a,a), True),
((b,a), False),
...]
# Moore and Mealy example
((a,a,a), "output1"),
((b,a), "output2"),

Mealy Machine learning

The syntax is the same, only notable difference is that all sequences in the data set have to be prefix closed, meaning that if the sequence

((a,a,a,), 'label') 

is in the data set, then its prefixes also have to be in the data set:

((a,a), 'label2),
((a), 'label'),

Helper function

If you have a list of tuples that contain input-output pairs, you can use convert_i_o_traces_for_RPNI those to the RPNI format.