W9 & W10

Woah. I didn’t realize it’s been such a long time since I updated the blog. Not that I haven’t done much work, of course. Meeting Dr. Rodger almost every day sort of gave me the impression that I did not need to write blog posts any more. Apparently that’s not the case. So here’s a recollection of what I have done since my last post:

After I finished up correcting the conversion from regular expression to dfa, I did some testing to make sure it was all working just fine.

Afterwards, I switched to transforming grammar. I spent some time reading through the chapter on transforming grammar on the JFLAP book to get to know more about the topic. I also ran through some examples using JFLAP 7 to see how the UI works. The part that took me quite a while was reading through the existing code/classes to understand how the current infrastructure works, since the lambda production removal panel is already in place.

Since then, I’ve been working on unit production removal. My goal was to get it done by the end of these 10 weeks but for now that’s not very likely. Nonetheless, I’ll continue working on the project throughout the summer and next semester.


W8D2

Today I switched to another part of the project and focused on fixing the bug with converting a regular expression to a finite automaton. Apparently the conversion for “ab*+c” was incorrect as “+” was not dealt with first. Initially I thought it was a problem with the priority, but I soon realized there is no […]


W8D1

At the request of Professor Rodger I tried to apply the same magnification techniques to the automatons. It kind of worked but not as good as the parse tree. The nodes, the labels, and the words were enhanced, but the arrows were not. I’ll fix that soon.


W7D2

Today was basically all about magnification. I first completed the work on magnification of the parse tree so that the nodes and labels are magnified/reduced along with the other texts as the bar is scrolled. I then applied the similar idea to DFA magnification. It kind of worked. The magnification isn’t as natural as the […]


W6D5 & W7D1

The parse tree is close to being finished! I first wrote a method to let the program preprocess the derivation to determine whether the grammar is unrestricted or not and then automatically selects the appropriate paint method to use (old method for unrestricted grammar, new method for context-free and regular grammar). I then tackled the […]


W6D4

I started off the day getting the stepping action to work. In other words, the portions of the parse tree is now displayed step by step. A few pictures of an example here: Nevertheless, the main problem I tackled was to dynamically resize the tree so that it can fit into the canvas regardless of […]


W6D3

Today was mostly about fine-tuning the tree-drawing method. While the tree looked pretty fine from yesterday’s work, it was far from perfect. Specifically, I fixed a few things: Removed the weird little node at the top left corner of the canvas Differentiated the color between a leaf node and a non-leaf node Moved the black […]


W6D2

Quite a lot of progress was made today! I dug very deeply into the tree drawing paper and debugged the algorithm with the example provided by the author. After some intense inspection I realized that there were actually three mistakes with the implementation by the author. These mistakes led to the code not functioning as […]


W6D1

Today is a continuation from last week’s work — tree drawing. The problem right now is that somehow all the nodes have the same x coordinate of 0. My suspicion is that the majority of the code works as intended but there is a minor glitch in one of the methods that make the calculation […]


W5D3

The talk by Professor Bruce Donald on designing proteins using efficient algorithms is engaging and inspiring. Professor Donald is a great speaker and he makes the convoluted topic sound interesting to us. It is also interesting to see how computer science can play a pivotal role in helping the humanity.