- Notifications
You must be signed in to change notification settings - Fork34
Common interface for all automaton types#54
-
In AALpy helper functions that work on automata (e.g. target_state=sifmissing_transition_go_to=='self_loop'elsesink_statelabel=dict(input=i)ifisinstance(automaton, (MealyMachine,Onfsm,StochasticMealyMachine)):label["output"]="epsilon"ifisinstance(automaton, (Mdp,StochasticMealyMachine)):label["probability"]=1.new_transition=lts_view.add_transition(source=s,target=target_state,label=label) Ideally minus the magic strings :D If we use mixins for the distinctions moore vs mealy and det vs non-det vs stochastic the comparison gets even simpler and more robust. Then we could replace e.g. Let me know what you think. |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment
-
I agree this can be simplified. But it might not be so important, and adds bit of "overhead" to this "should be simple" automaton classes. Lets talk in few days in the office. |
BetaWas this translation helpful?Give feedback.