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

Architecture #1

Open
Alagris opened this issue Mar 17, 2020 · 0 comments
Open

Architecture #1

Alagris opened this issue Mar 17, 2020 · 0 comments

Comments

@Alagris
Copy link
Owner

Alagris commented Mar 17, 2020

So far there should obviously be:

  • theoretical paper
  • C library - depends on paper
  • cmd interface & compiler - depends on C library
  • online REPL - depends on compiler interface

When it comes to C library i think there are two basic architectures that we could follow:

  • there is one data structure and several functions operating on this data structure (possibly in-place to save space). Every more specialised data structure is just a special case of that one general data structure. For example finite state automata are just mealy machines with empty output everywhere.
  • there are multiple data structures and some functions take and produce different structures. For instance one function takes 2 finite state machines and combines them into one Mealy machine

For cmd interface, we can take two basic architectures:

  • there is one real interface and compilation works just like: first start real, then type ":load some/file.code", then type ":compile", the type ":save some/file.binary" and then ":exit"
  • every time you want do perform some operation, you use different command for it. For instance to concatenate two automata you run "compiler --concatenate file1.code file2.code --output file3.txt" and then to compiler you run "compiler --compile file3.txt --output file.binary"

when it comes to online REPL we can experiment with 2 possibilities:

  • everything runs on user-side in webAssembly
  • mostly runs on server-side and user only sees interface
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

No branches or pull requests

1 participant