Skip to content

Commit 2716ca4

Browse files
committed
fix GsmNode typing
1 parent edeb8af commit 2716ca4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ AALpy also features a Generalized State Merging (GSM) framework based on the [Re
3535
| **Automata Type** | **Supported Formalisms** | **Active Algorithms** | **Passive Algorithms** | **Features** |
3636
|-------------------|:-----------------------------------------------------------------:|---------------------------------------------------------|------------------------------------|----------------------------------------------------------------:|
3737
| Deterministic | DFAs <br /> Mealy Machines <br /> Moore Machines | L* <br /> KV <br /> L# | RPNI <br /> EDSM <br /> GSM | Seamless Caching <br /> Counterexample Processing <br /> 12+ Equivalence Oracles <br /> Adaptive L# |
38-
| Non-Deterministic | ONFSM <br /> Abstracted ONFSM | L*<sub>ONFSM</sub> | | Size Reduction Trough Abstraction |
38+
| Non-Deterministic | ONFSM <br /> Non-deterministic Moore Machines <br /> Abstracted ONFSM | L*<sub>ONFSM</sub> | k-tails | Size Reduction Trough Abstraction |
3939
| Stochastic | Markov Decision Processes <br /> Stochastic Mealy Machines <br /> Markov Chains | L*<sub>MDP</sub> <br /> L*<sub>SMM</sub> | Alergia <br /> IoAlergia <br /> Alergia<sub>EDSM</sub> | Counterexample Processing <br /> Exportable to PRISM format <br /> Bindings to jALERGIA |
4040
| Pushdown | VPA/SEVPA | KV<sub>VPA</sub> | PAPNI | Passive learning of VPAs <br /> Exclusive call-return pairs
4141
</div>

aalpy/learning_algs/general_passive/GsmAlgorithms.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,14 @@ def EDSM_score(part: Dict[GsmNode, GsmNode]):
6060
return learned_model
6161

6262

63-
def run_k_tails(data, automaton_type, k, input_completeness=None, print_info=True) -> Union[DeterministicAutomaton, None]:
63+
def run_k_tails(data, automaton_type, k, input_completeness=None, print_info=True) -> Union[
64+
DeterministicAutomaton, None]:
6465
"""
6566
Runs k-tails.
6667
6768
Args:
68-
data: sequence of input sequences and corresponding label. Eg. [[(i1,i2,i3, ...), label], ...]
69-
automaton_type: either 'dfa', 'mealy', 'moore'. Note that for 'mealy' machine learning, data has to be prefix-closed.
69+
data: sequence of input-output traces
70+
automaton_type: either 'mealy' or 'moore'. Note that the data has to be prefix-closed.
7071
k: depth until which to check node compatibility
7172
input_completeness: either None, 'sink_state', or 'self_loop'. If None, learned model could be input incomplete,
7273
sink_state will lead all undefined inputs form some state to the sink state, whereas self_loop will simply create
@@ -85,12 +86,11 @@ def run_k_tails(data, automaton_type, k, input_completeness=None, print_info=Tru
8586

8687
internal_automaton_type = 'moore' if automaton_type != 'mealy' else automaton_type
8788

88-
8989
score = ScoreWithKTail(ScoreCalculation(GsmNode.deterministic_compatible), k)
9090

9191
learned_model = run_GSM(data, output_behavior=internal_automaton_type,
9292
transition_behavior="nondeterministic",
93-
score_calc=score, data_format='labeled_sequences', instrumentation=print_level)
93+
score_calc=score, data_format='io_traces', instrumentation=print_level)
9494

9595
if not learned_model.is_input_complete():
9696
if not input_completeness:

0 commit comments

Comments
 (0)