Weekly Journals

<= Back


Week 1: June 1 - 7

Currently I am working on the CoGenT project in the ALI lab. For the first week, I familiarized myself with the project by reading some documentation and try my hand at coding in CISL. In particular, I browsed through the Power ISA specification and coded the load and store functions for floating point single precision as well as a few other non-computational functions. Since there is little documentation for CISL, I set up a wiki on my website so us three REUs (Adam, Addison and I) can keep track of the bugs, semantics and such. Now, what are we doing? Well, currently CoGenT is focusing on instruction selectors. I drew a diagram to better illustrate where what we are doing fits in. Everything that is blue in the diagram below is part of CoGenT and "week 1" is what we are working on right now and we are only doing PPC.



Work aside, this is also the week we got settled into the dorms. We are currently living in the newly built dorms, which have consists of 4 room, 2 bathrooms, a fridge and a kitchen in each suite, I guess cooking won't be a problem. Most of the Computer Science REUs are living in the same hall as I am. To get to know everyone, we knocked on everyone's door and introduced ourselves as well as held a semi-potluck dinner together.


Week 2: June 8 - 14

Among the three of us REUs, we are almost finished with coding the PowerPC instructions and have become somewhat familiar with programming in Eclipse using CISL. Tim, who oversees the REUs in the lab, suggested us working on adapters for the next two weeks (their roles in the project are highlighted in the diagram in week 1). We explored the best ways to do that by looking into ANTLR and StringTemplate, but finally decided coding in Python is probably easier. In addition to the exploration, we looked at the code to get a better understanding of exactly what Gist do with the inputs and what does it outputs.

Since this is the last week the ice rink at U of Mass is open, Lauren, another REU who loves ice skating, organized an ice skating event for us CS REUs. The rental skates are absolutely horrible, but the experience is definitely fun and all of us got party pizza afterward, the perfect ending.



Week 3: June 15 - 21

The patterns Gist generated are outputted in an XML format. The job of the adapter is to take the XML formatted output, parse it, and rewrite it into code form specific to the compilers (Jikes, lcc and such). Since I have very little experience with different compilers and XML, I spent the first half of the week reading on how to parse XML using Python. Since Tim didn't have a compiler in mind for me to work on yet, he said it would be great if we could revamp the CoGenT website. I was quite happy to, and made a new layout for the website.

Original layout:

original cogent web

New design:

new cogent web

Approved design:

final design

Over the weekend, Kirby and Johnny invited the CS summer REUs living in the dorm to their apartment for some tasty calzones, and we watched Office Space while we were there. The picture-loving Jonny took more than enough pictures for all of us (it has been 3 weeks and he took ~500 pictures!). All pictures that I used on this website are taken by Jonny.


Week 4: June 22 - 28

Since I finished making most of the website last week, Ed introduced me to the SPU instruction set architecture. I coded the floating point section of SPU instructions in CISL (target descriptions) to put into Gist, similar to what we did with Power PC instructions as illustrated in the Gist diagram shown in week 1. The main difference is that the SPU is a vector processor, which means it can execute multiple operations simultaneously. I thought that was pretty cool. Since Power PC is a general purpose processor and SPU is a vector processor, the specifications for the SPU are a lot shorter and simpler than the specifications for Power PC.

While it has only been 4 weeks, I feel like I've known everyone for a long time. I make cake and bring them to lunch sometimes, other people cook and invite us over to their suite to eat, and we went bowling on the bowling alley's "all you can eat pizza" day.


Week 5: June 29 - July 5

I thought there were a lot to do for the SPU floating point instructions, but it turns out that the important and difficult implementation sections are saved for later, which made our job much simpler. Between Adam and I, we finished writing up the SPU instructions this week. Tim suggested me helping Adam to write the adapter for Jikes compiler x86, so Adam gave me a brief overview of what he has done so far before the weekend.

Week 6: July 6 - 12

This week we discussed where the project is headed. The current goal is to make sure Jikes RVM works smoothly with Gist and ultimately submit a paper to ASPLOS by beginning of August. It is the time to start testing. We decided to tackle the Power PC in Jikes RVM first. I ran Gist, then ran the adapter on the Gist output, and finally match the bytecode output against the JikesRVM baseline compiler files that the output is suppose to replace. Bytecode is the term for the instructions that Jikes execute (add, sub, load and etc).I combed through half of the output. Some of the output is not present in the generated file and others have differences that require us to go into different files to correct, all of which are documented.

Week 7: July 13 - 19

I continued the testing from last week and fixed the minor mistakes for some of the bytecode (our graduate student mentor is doing the major fixes). In addition to that, we also explored the possibility of integrating the ability to work with 64 bits into the generated baseline compiler outputs. Currently the bytecode is for 32 bit registers. There are some complications with conversions when we want the bytecode to work with 64 bits register, so that is what we are working on right now.

This week is pretty exciting. I went to an Olin gathering in MA hosted by an Olin family. It was good to see fellow Olin friends mid-summer, catch up on what everyone is doing and relax (and good food of course). Meanwhile, most of the fellow CS REUs decided to go sky diving. It looks exciting, but I think I'll stick to roller coasters.

Week 8: July 20 - 26

The research is coming to an end and it is time for us to get some results. We met with the mentors and graduate students briefly to talk about what has been done so far, where the project is headed, and the possibility of publishing a paper. In addition to fixing the byte codes, we needed some way of testing the Gist process, and that is what we are focusing on right now.

While most of the work are continuation of last week, Wendy, who is in charge of the REUs, has something fun planned for us this week. Since the CS building common room has a foosball table, we had a foosball tournament this week. Since it is my first time playing, our team didn't get 1st place but it still is exciting.

foosball tournament

This week also happen to be Lauren's b-day, so all of us REUs went roller skating to celebrate.


Week 9: July 27 - August 2

For this week, we focused on testing instruction selection from Gist in Jikes RVM. Since Jikes RVM is a JIT compiler (Just In Time), we performed runtime benchmarks to demonstrate that the instruction selector generated by Gist does not hinder the efficiency of the compiler. We used DaCapo, a standard Java runtime benchmarking package, and decided to run tests 10 times for the generated and original baseline compiler implementation.

Rick and Wendy, both of whom are in charge of the REU program at UMass, arranged a trip to visit Microsoft, Google and IBM for us. We rode the bus to Boston on Monday and had a great time. We attended talks from all three places and ate at Google's cafeteria. Microsoft has beautiful office with bright colors, beautiful view of a river, and no walls between people's desk. Google have minimum decorations, but the decorations they have are cute, a lot of circle shape, a few message chairs, and xkcd cartoons painted on some walls (who doesn't want xkcd cartoons painted on the walls?). What I love most, however, is that all the desk have ~20in dual monitors and there are huge white boards everywhere, including kitchen cabinets (if you are brainstorming, you can never have enough white board). IBM looks more like traditional offices, but since we didn't tour the building, I can't make an accurate judgement. Below is a picture of us playing with Microsoft Surface.

microsoft surface

Week 10: August 3 - 7

This week is the final week and I finally finished running the 10 iterations of the tests. The graph below demonstrate our result, which shows that the there is no significant difference in runtime between the generated and original instruction selector. Instead of having a presentation by grad students on Tuesday, the CS REU made posters and we had a poster session on our summer researches. Here is my poster.

Final Report

Here is the final report that I wrote based on the research throughout the 10 weeks and the final presentation we gave for week 10.