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

Automata input format #16

Open
mroman42 opened this issue Jan 7, 2015 · 3 comments
Open

Automata input format #16

mroman42 opened this issue Jan 7, 2015 · 3 comments

Comments

@mroman42
Copy link
Member

mroman42 commented Jan 7, 2015

We should decide a standard format for reading and writing automatas. Something like:

dfa
alpha: [a,b,c]
states: [A,B,C]
A a -> A
A b -> B
A c -> B
B a -> B
B c -> C
C a -> C

(Maybe alpha and states are not necessary)

@mx-psi
Copy link
Contributor

mx-psi commented Jan 7, 2015

YAML seems quite similar to this, except for the transition function definition, which might be implemented as a list of triples. There is a Haskell YAML parser that might save us some work.

@mroman42
Copy link
Member Author

mroman42 commented Jan 8, 2015

Maybe something similar to:

dfa
alpha: [a,b,c]
states: [A,B,C]
transitions:
 - A: {a:A, b:B, c:B}
 - B: {a:B, c:C}
 - C: {a:C}

But I don't see how we can extend this format to NFA automata.

@mx-psi
Copy link
Contributor

mx-psi commented Jan 9, 2015

I don't know if this is possible but we could write it like this:

nfa
alpha: [a,b,c]
states: [A,B,C]
transitions:
 - A: {a:[A,B], b:[B], c:[B,C]}
 - B: {a:[A,B,C], c:[]}
 - C: {a:[C]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants