Day 3 Week 8 on JFLAP

  1. Fix can’t drag nodes after adding edges in TMEditor and NPDAEditor bug
  2. Edge label position update after adding edges
  3. In delete mode, when the label clicked has only one transition, the edge is deleted
  4. Click on label to delete in FAEditor
  5. getStackAlphabet and getTapeAlphabet functions moved to NPDA.js and TuringMachine.js
  6. Use ‘a,b;c’ form in NPDAEditor and ‘a;b,R’ form in TMEditor. The scenario here is to use ‘;’ to separate input and output

Day 2 Week 8 on JFLAP

Today I added NPDAEditor, whose UI is very similar to TMEditor I completed several days ago. For edit/delete edges I did the similar thing with TMEditor, just that the third column is for the user to type instead of choosing from L, S or R. Then I fixed several things in both files: users can now put in □ and λ by leaving an entry blank when creating or editing an edge; alphabets are not updated when users load files from local directories. One problem to fix is the alphabet does not update when users delete nodes using the right-click menu. I didn’t check but this is probably a problem for FAEditor as well. I will fix this tomorrow.

For the next step I’m going to improve the UI for traversal displaying in NPDA and Turing Machine editors. There are also some label position issues with both editors.

Day 1 Week 8 on JFLAP

    1. dragging boundary set for initial states. Initial markers now always appear
    2. one-click clear labels button added for FAEditor when coming back from minimization or conversion
    3. LaTex enabled in create exercise page. Instructors are able to type in LaTex such as m^n, which will appear as superscripts in exercises.

    1. edit and delete edges features added to TMEditor: in edit mode, clicking on a label will show a table containing transitions. Users can then change characters or delete transitions. Enter to confirm, Esc to cancel.


Day 3 Week 7 on JFLAP

  1. minimize DFA

    check for partition completeness fixed: the program no longer alerts the partition is not completed when it is.

    variable minimizedEdges changed to 2D array with node(FAState) as parameters. minimizedEdges[i][j] is an array of characters on the edge from node i to node j

    add trap states before everything so the program can run on incomplete DFAs

  2. Regular Expression

    no unnecessary parentheses are added

  3. FA.js

    right click menu no longer disables dragging

    dragging no longer unhighlights nodes that are originally highlighted

  4. FAEditor

    notify the user about current action: toRE

    regular expression now shows as the title of the page


Demo of FA – RE – NFA – DFA – minimize DFA:

Day 2 Week 7 on JFLAP

  1. NFA -> DFA nodes layout bounds fixed
  2. FAtoRE dragging helper lines disappear after adding edges now
  3. in FAEditor clicking on ‘toRE’ will scroll up to jsav msg
  4. FATester, FAFixer scroll down for test results
  5. does not alert to export as soon as the user completes
  6. add check done button for NFAtoDFA
  7. add description feature to exercise generator
  8. make createDFAexercise prettier

pretty create exercise pagePretty create exercise page

Day 1 Week 7 on JFLAP

Today I added a NFA to DFA tool. Before we had this file in exercise format, but now I created a new file with only the converting functions so that FAEditor can use it to convert NFA to DFA. Then I worked on the export of graphs between these files. Now you can start from FAEditor, create an FA, use the FAtoRE button to convert it to regular expression, and export to REtoFA.html, from where you can convert back to NFA and export to FAEditor, and further convert it to DFA and export back toFAEditor, so it’s an ecosystem now, just like JFLAP. I will work on the minimizing proof tomorrow.

Day 5 Week 6 on JFLAP

Today is the day I give up refactoring grammar. I changed the files back to its state and deleted the files I added. The functions and variables are hopeless. I don’t understand how one could continue adding code to this already relentless and magically working code. From next week I will focus on creating exercises models and exercises question generators instead of refactoring. I read some book chapters about refactoring methodologies and a paper about algorithm visualization softwares in the afternoon. The book is very useful and provided me some insights about refactoring. Sadly I’m not doing it again.

Day 4 Week 6 on JFLAP

Today I did even more refactoring. I extracted methods from the long long code of parsing functions and moved the common ones to a file ParseHelper.js. The file contains a ParseHelper class, whose objects are able to hold many grammar-related variables. This will make my life much easier. Functions that do not need so many variables or are not only relavent to parsing are moved to GrammarTools.js. Other than this, I also moved each parsing function to its own controller file. The controllers also act as classes. Object oriented af!

Oh yes, before all these I moved the exercise feature to ExerciseController.js. FATester and FAFixer are now configured to use this class.