precup / turing-machine-sim

A design/testing tool for Turing machines
MIT License
3 stars 1 forks source link

TMs need another alphabet for the tape alphabet #164

Closed precup closed 9 years ago

precup commented 9 years ago

Involved subtasks:

Adding a text box for it to the main page that appears iff TM is selected Adding another URL param Adding the new alphabet (henceforth tapeSet) to the metadata on save files Checking this alphabet for submission as well Displaying this, if defined and different than the character set, on the bottom bar Switch the edge editor to be based on tapeSet instead of charSet Edit the simulation to be based on the tapeSet instead of the charSet

precup commented 9 years ago

We'll get weird errors cropping up if the tape language isn't a superset of the input language, dunno how to handle that, though, thoughts?

maxwang7 commented 9 years ago

Adding a text box for it to the main page that appears iff TM is selected - Done, but @moonj needs to style it because the textbox is causing the line to overflow

Adding another URL param - the param is called tapeSet. I've changed all of main.js to also use tapeSet when appropriate. I also added code to graph.js in init() that adds the tapeSet to the graph.

Adding the new alphabet (henceforth tapeSet) to the metadata on save files - changed the gGraph.save() function to return the tapeSet in the "meta" property

Checking this alphabet for submission as well - added in gModalMenu.submitModal.submit()

Displaying this, if defined and different than the character set, on the bottom bar - Done, in top.js's gTopMenu.draw()

Switch the edge editor to be based on tapeSet instead of charSet - changes in edit.js and edges.js

Edit the simulation to be based on the tapeSet instead of the charSet - one change in gTMSimulator.convert()

maxwang7 commented 9 years ago

@moonj, nevermind, you already did that, thanks!