Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified AutomataSUL file #55

Merged
merged 10 commits into from
Dec 13, 2023
Merged

Simplified AutomataSUL file #55

merged 10 commits into from
Dec 13, 2023

Conversation

zwergziege
Copy link
Collaborator

This gives a unified SUL for different Automaton types.

I also took the freedom to always include the initial output for automaton types that have an initial output (DFA, Moore, MC, MDP). If this inconsistency was on purpose I can match the original behavior.

I left the original classes as aliases to the unified SUL to avoid breakage for users. There are some internal uses which I'd like to purge.

@emuskardin
Copy link
Member

Will do quick round of testing tomorrow or today, check for potential places where it could break something, and run few tests...
Fine with updating internal uses, but important to keep aliases as it would break all external uses.

Will merge then.

@emuskardin
Copy link
Member

emuskardin commented Nov 9, 2023

Tbh adding initial input in Moore-likes is counter-intuitive to me. Why?
If a user wants, easy to do, but if I query an input sequence I want corresponding outputs.

Plus then it makes something like zipping inputs and outputs harder, it is not consistent with execute_input_sequence etc.
I only had different behavior for MDPs as Martin formulated an observation table in such a way, but this can be more easily circumvented than changing query behavior for other Moore likes.

Afaik AutomataLib form Learnlib does the same?

@zwergziege
Copy link
Collaborator Author

zwergziege commented Nov 10, 2023

I don't care too much as long as the behavior of SULs is consistent among Moore-like automata. So maybe it would be nice to adapt Martin's code to get a uniform interface. For now, I restored the original behavior (include initial output only for MDPs and MCs). One thing that's weird is that the test_deterministic passes if I also add the initial output for Moore machines but not for DFAs (is_accepting). I did not investigate it, but there might be a bug hidden there.

I purged the aliases.

@emuskardin emuskardin merged commit 9d07f5d into master Dec 13, 2023
3 checks passed
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.

2 participants