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

CAN NOT GO BACKWARD DURING SIMULATION MODE #72

Open
kuberkhanna opened this issue Mar 5, 2019 · 4 comments
Open

CAN NOT GO BACKWARD DURING SIMULATION MODE #72

kuberkhanna opened this issue Mar 5, 2019 · 4 comments

Comments

@kuberkhanna
Copy link

during testing the machine i discovered that you can not go back and if you want to go back to any state you have to start all over
For e.g.

if the input string is "aaAb"

i can not go back from b -> A -> a and so on

@Necried
Copy link
Collaborator

Necried commented Mar 5, 2019

Right now we do not support this feature for two reasons:

  1. From the theoretical aspect on state machines, we treat "input tapes" as one-directional, read-only input. The machine has no power, at any point in the execution, to backtrack its input tape. Something like a Turing Machine would be able to, but definitely not finite state machines.

  2. If we think of the state diagram in terms of graphs, we're explicitly representing a state machine as a directed graph. In other words, the edges are unidirectional, and once a path is taken, we cannot backtrack. Making the graph undirected is not the solution either!

I can see why this might be useful from a practical perspective, but having this will contradict the aforementioned issues with how finite state machines are supposed to be, which I think is an integral part of the app- teaching users what FSMs are and how they work. Implementation-wise, it just means we have to keep a data structure that snapshots the machine at each input read.

I don't think we will support this in the near future, unless @CSchank thinks so otherwise.

@CSchank
Copy link
Owner

CSchank commented Mar 5, 2019

When we talked about this in tutorial, I definitely was more positive about implementing this. Since then, I've had the same thoughts as Lucas, and hearing Lucas reiterate them here I think that might be the best thing to intentionally not implement this feature. So I think we'll leave it as is for now. We could ask Dr. Farmer his opinion but I do agree it could put the wrong ideas in people's heads. However I think the left arrow should reset back to the start for sure.

@CSchank
Copy link
Owner

CSchank commented Mar 5, 2019

Thanks for the comment though, we appreciate your input. Believe us, if we didn't have a good reason not to implement it, we definitely would. And still may in the future. :)

@kuberkhanna
Copy link
Author

Fair enough

I also believe that using a colour to represent the string input being processed will make it easier to see the input being processed, the current cursor is too light

CSchank added a commit that referenced this issue Mar 7, 2019
For now, we will not go backwards as I believe this would imply that machines can go backwards and forwards. However, having the left arrow reset the tape to the beginning is helpful.
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

3 participants