Skip to content

Gsm v2 - #111

Closed
emuskardin wants to merge 73 commits into
masterfrom
gsm-v2
Closed

Gsm v2#111
emuskardin wants to merge 73 commits into
masterfrom
gsm-v2

Conversation

@emuskardin

@emuskardin emuskardin commented Sep 9, 2026

Copy link
Copy Markdown
Member

TODO

add_labeled_sequence aggregates intermediate steps under unknown_output (DataHandler.py:100-110) and, when a later sequence resolves that output, only remaps transitions — the handler data is left alone. So count-based handlers on labeled_sequences split counts across two keys:

labeled: {'a': {<unknown_output>: 1, False: 1}}   vs   io_traces: {'a': {False: 2}}

shadow_pta keeps a stale unknown_output key the same way. Fixing it properly needs a "output resolved" hook on DataHandler (the remap is handler-specific), which is more than a minimal change, so I left it: it's captured as @unittest.expectedFailure in test_gsm_data_handler.py:46 with the cause in a comment. It flips to an unexpected success once fixed.
- GsmAlgorithms.py mealy sentinel leak: run_EDSM(..., automaton_type='mealy') on data that isn't prefix-closed (violates the documented precondition) doesn't raise — it silently produces a MealyMachine with unknown_output's sentinel object as a real transition's output. Low priority since it's already documented as unsupported, but corrupting silently instead of raising seems worth a guard.

Ensure, also in tests / run exaustive that I have added, that DFA and Moore learning works also with non-prefix closed data

zwergziege and others added 30 commits September 29, 2025 17:58
@emuskardin
emuskardin requested review from zwergziege and removed request for zwergziege September 9, 2026 17:00
Comment thread aalpy/learning_algs/general_passive/GeneralizedStateMerging.py Outdated
Comment thread aalpy/learning_algs/general_passive/ScoreFunctionsGSM.py
Comment thread aalpy/learning_algs/general_passive/AssociatedData.py Outdated
Comment thread aalpy/learning_algs/general_passive/GeneralizedStateMerging.py Outdated
@zwergziege

Copy link
Copy Markdown
Collaborator

regarding 1: since having counts for non-prefix-closed deterministic data is not all that useful, i suggest simply raising an exception if unknown_output is encountered in the data handler. if somebody really needs it, they can implement it themselves.

regarding 2: i think this behavior is perfectly fine. the classic RPNI version also does not raise on None outputs. a warning maybe.

@zwergziege zwergziege mentioned this pull request Sep 16, 2026
@zwergziege
zwergziege marked this pull request as draft September 16, 2026 08:44
@emuskardin emuskardin closed this Sep 17, 2026
@emuskardin
emuskardin deleted the gsm-v2 branch September 17, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants