leonbohn / lama

Learning and Manipulation of Automata
MIT License
4 stars 0 forks source link

Rework Macros for different automata types #35

Closed leonbohn closed 7 months ago

leonbohn commented 8 months ago

Right now, different automata types are implemented by the impl_mealy_automaton and impl_moore_automaton macros in mealy.rs and moore.rs, respectively. We should explore ways to make this more ergonomic and easy to refactor.

One option would be to define each automaton type entirely by hand and have more control like that.

Alternatively, we could introduce a struct like Automaton, which takes in a transition system and a set of semantics. These semantics then define how a run is handled. Some testing with the idea has been done in semantics.rs. Could be nicer to work with as we can use const generics to distinguish finite from infinite semantics.