<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2005239310785488917</id><updated>2012-02-15T22:41:37.393-08:00</updated><title type='text'>EduMIPS64 development blog</title><subtitle type='html'>The EduMIPS64 development blog</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://edumips64.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://edumips64.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Andrea Spadaccini</name><uri>https://profiles.google.com/100649395018186034267</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-_-VuVr6VupY/AAAAAAAAAAI/AAAAAAAAB68/1VkShREcwDw/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2005239310785488917.post-1640719405621047260</id><published>2011-11-01T16:33:00.000-07:00</published><updated>2012-02-11T11:13:13.218-08:00</updated><title type='text'>Repository migrated to git</title><content type='html'>The EduMIPS64 source code repository, hosted at svn.edumips.org, has been converted to git.&lt;br /&gt;&lt;br /&gt;So far, the repository contents have been migrated to git using the method described in &lt;a href="http://progit.org/book/ch8-2.html"&gt;Pro Git&lt;/a&gt;, and the resulting git repository has been pushed to &lt;a href="http://code.google.com/p/edumips64/"&gt;Google Code&lt;/a&gt; and &lt;a href="https://github.com/lupino3/edumips64"&gt;Github&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The next step is to create a git repository on edumips.org and configure Trac and Apache in order to let them serve the git repository. Most probably, the SVN repository will be removed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EDIT:&lt;/b&gt;&amp;nbsp;the github repository is now the main one. There will be no repository hosted on edumips.org.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2005239310785488917-1640719405621047260?l=edumips64.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edumips64.blogspot.com/feeds/1640719405621047260/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://edumips64.blogspot.com/2011/11/repository-migrated-to-git.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/1640719405621047260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/1640719405621047260'/><link rel='alternate' type='text/html' href='http://edumips64.blogspot.com/2011/11/repository-migrated-to-git.html' title='Repository migrated to git'/><author><name>Andrea Spadaccini</name><uri>https://profiles.google.com/100649395018186034267</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-_-VuVr6VupY/AAAAAAAAAAI/AAAAAAAAB68/1VkShREcwDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2005239310785488917.post-451810856640622779</id><published>2011-09-17T04:52:00.000-07:00</published><updated>2011-09-17T05:01:16.292-07:00</updated><title type='text'>Finding bugs via bisection</title><content type='html'>In the last version of EduMIPS64, we introduced a &lt;a href="http://www.edumips.org/ticket/8"&gt;nasty bug&lt;/a&gt;&amp;nbsp;that caused the simulator to stop working under Mac OS X Snow Leopard. Now we will not delve into the usual sayings about Java being "write once, debug everywhere", but instead we will show you how we actually identified the commit that introduced the bug.&lt;br /&gt;&lt;br /&gt;The bug was discovered during the development of version 0.5.3, and the problem is that we don't have access to Mac OS X machines for testing, so usually we develop under Linux and sometimes we test also under Windows. So when one of the users reported the bug for version 0.5.3-rc2 we had no idea of which commit could have introduced the bug.&lt;br /&gt;&lt;br /&gt;The stack trace wasn't helpful, just a StackOverflowError with lots of nested AWT/Swing calls, there was no pointer to the EduMIPS64 source code.&lt;br /&gt;&lt;br /&gt;So when last week we could use a Snow Leopard machine to find and fix the bug, we had the problem to first identify the incriminated commit. The SVN revision of 0.5.2 is 436, while the last revision was 623. So there are 187 commits to check.. how to do it (possibly avoiding brute force)?&lt;br /&gt;&lt;br /&gt;Enter &lt;b&gt;bisection&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Bisection is a technique similar to binary search. You have a &lt;i&gt;good&lt;/i&gt; version (rev. 436) and a &lt;i&gt;bad&lt;/i&gt;&amp;nbsp;version (rev. 623). What you do is to move at revision &lt;i&gt;(good + bad) / 2&lt;/i&gt;, check if it is working or not, mark it as &lt;i&gt;good&lt;/i&gt;&amp;nbsp;or &lt;i&gt;bad&lt;/i&gt;&amp;nbsp;and repeat the process until the distance between &lt;i&gt;good&lt;/i&gt;&amp;nbsp;and &lt;i&gt;bad &lt;/i&gt;is 1. This means that you have identified the change that made your &lt;i&gt;good&lt;/i&gt;&amp;nbsp;program a &lt;i&gt;bad&lt;/i&gt;&amp;nbsp;program.&lt;br /&gt;&lt;br /&gt;You will recognize a familiar pattern here: you are always halving the distance to the objective. This means that you will be able to identify the culprit in &lt;span class="Apple-style-span" style="font-family: inherit;"&gt;log&lt;sub&gt;2&lt;/sub&gt;(&lt;i&gt;good - bad&lt;/i&gt;)&lt;/span&gt;. In our case, &lt;span class="Apple-style-span" style="font-family: inherit;"&gt;log&lt;sub&gt;2&lt;/sub&gt;(623-436) = 10&amp;nbsp;(rounding up the result). This means that in at most 10 update/compile/test cycles we will find our bug, provided that we can easily and without hesitation say if each version is &lt;i&gt;good&lt;/i&gt;&amp;nbsp;or &lt;i&gt;bad&lt;/i&gt;. And in our case a &lt;i&gt;bad&lt;/i&gt; version means that the simulator is totally hung up, so it is easy.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;So, we started from (623 + 436) / 2 = 530, and this is the path that we followed: 530 (&lt;i&gt;good,&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: #fffff2; line-height: 28px; white-space: nowrap;"&gt;↑&lt;/span&gt;), 576 (&lt;i&gt;bad&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-style-span" style="background-color: #fffff2; line-height: 28px; white-space: nowrap;"&gt;↓&lt;/span&gt;), 553 (&lt;i&gt;bad&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-style-span" style="background-color: #fffff2; line-height: 28px; white-space: nowrap;"&gt;↓&lt;/span&gt;), 541 (&lt;i&gt;bad&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-style-span" style="background-color: #fffff2; line-height: 28px; white-space: nowrap;"&gt;↓&lt;/span&gt;), 535 (&lt;i&gt;bad&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-style-span" style="background-color: #fffff2; line-height: 28px; white-space: nowrap;"&gt;↓&lt;/span&gt;), 532 (&lt;i&gt;good&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-style-span" style="background-color: #fffff2; line-height: 28px; white-space: nowrap;"&gt;↑&lt;/span&gt;), 534 (&lt;i&gt;bad&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-style-span" style="background-color: #fffff2; line-height: 28px; white-space: nowrap;"&gt;↓&lt;/span&gt;), 533 (&lt;i&gt;bad&amp;nbsp;&lt;/i&gt;&lt;span class="Apple-style-span" style="background-color: #fffff2; line-height: 28px; white-space: nowrap;"&gt;↓&lt;/span&gt;). So the commit that introduced the bug is&amp;nbsp;&lt;a href="http://www.edumips.org/changeset/533/"&gt;533&lt;/a&gt;. We "simply" had to figure out what is the bug.&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;Turns out that commit 533 is a bad commit in itself, because packs several changes at a time (introduction of a singleton, changes to the buildfile and to the logging system setup). So we spent half an hour with the singleton only to find out that the problem was that the JVM of Snow Leopard didn't appreciate that we tried to get the root logger by calling &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;Logger.getLogger()&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&amp;nbsp;with an empty string as a parameter (as shown in the&amp;nbsp;&lt;a href="http://download.oracle.com/javase/1,5.0/docs/guide/logging/overview.html"&gt;official docs&lt;/a&gt;, even if we couldn't find this document for version 6). Using another logger instead of the root logger &lt;a href="http://www.edumips.org/changeset/624/"&gt;solved the problem&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;By the way, if we used git (and we will migrate to it shortly), we could have used the wonderful command&amp;nbsp;&lt;a href="http://kerneltrap.org/node/11753"&gt;git bisect&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;So, lessons learned:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;use bisection to find a commit that introduced a bug, if you&lt;i&gt;&amp;nbsp;&lt;/i&gt;can easily tell if a commit contains or not the bug;&lt;/li&gt;&lt;li&gt;try to limit what you change in a commit, so that later it is easy to find what's wrong in that commit;&lt;/li&gt;&lt;li&gt;use git because it helps you in doing both those things. :)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Enjoy!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2005239310785488917-451810856640622779?l=edumips64.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edumips64.blogspot.com/feeds/451810856640622779/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://edumips64.blogspot.com/2011/09/finding-bugs-via-bisection.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/451810856640622779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/451810856640622779'/><link rel='alternate' type='text/html' href='http://edumips64.blogspot.com/2011/09/finding-bugs-via-bisection.html' title='Finding bugs via bisection'/><author><name>Andrea Spadaccini</name><uri>https://profiles.google.com/100649395018186034267</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-_-VuVr6VupY/AAAAAAAAAAI/AAAAAAAAB68/1VkShREcwDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2005239310785488917.post-82185368556812165</id><published>2011-08-11T03:38:00.000-07:00</published><updated>2011-08-12T11:12:01.876-07:00</updated><title type='text'>Web site and SVN down</title><content type='html'>Unfortunately, slicehost is down right now, and all our services are hosted on a slicehost VPS.&lt;br /&gt;&lt;br /&gt;This means that both the web site and SVN are down right now. I hope there is no big data loss, as I don't have a backup copy of the wiki and would need to rely on the Google cache to rebuild the pages.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE:&lt;/b&gt;&amp;nbsp;Slicehost was down only for 6 hours (&lt;a href="http://status.slicehost.com/"&gt;http://status.slicehost.com/2011/8/11/stl-a-issues-3&lt;/a&gt;), and there was no data loss. Time to plan backups!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2005239310785488917-82185368556812165?l=edumips64.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edumips64.blogspot.com/feeds/82185368556812165/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://edumips64.blogspot.com/2011/08/web-site-and-svn-down.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/82185368556812165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/82185368556812165'/><link rel='alternate' type='text/html' href='http://edumips64.blogspot.com/2011/08/web-site-and-svn-down.html' title='Web site and SVN down'/><author><name>Andrea Spadaccini</name><uri>https://profiles.google.com/100649395018186034267</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-_-VuVr6VupY/AAAAAAAAAAI/AAAAAAAAB68/1VkShREcwDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2005239310785488917.post-282398093821227409</id><published>2011-06-23T02:51:00.000-07:00</published><updated>2011-06-23T02:51:58.685-07:00</updated><title type='text'>Status update on 0.5.3</title><content type='html'>The version 0.5.3 of EduMIPS64 is almost ready. Thanks to the students of the Computer Architecture course at the University of Catania I was able to find and fix some bugs (see the&amp;nbsp;&lt;a href="http://www.edumips.org/browser/branches/0.5/ChangeLog?rev=597"&gt;temporary ChangeLog&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;I also cleaned up the configuration of Trac on edumips.org and started using its ticket tracking features.&amp;nbsp;&lt;a href="http://www.edumips.org/roadmap"&gt;Here&lt;/a&gt;&amp;nbsp;is reported the project roadmap (with no due dates) and&amp;nbsp;&lt;a href="http://www.edumips.org/report/6"&gt;here&lt;/a&gt;&amp;nbsp;are all the tickets (including closed ones), grouped by milestone.&lt;br /&gt;&lt;br /&gt;I moved two tickets that need more time to 0.5.4, so for releasing 0.5.3 only two bugs need to be addressed. The problem is that&amp;nbsp;&lt;a href="http://www.edumips.org/ticket/8"&gt;one&lt;/a&gt;&amp;nbsp;of them is related to the Mac OS X platform, and I don't have a Mac to work on it. People have been reproducing it on different versions of Mac OS X, and it is obviously a regression because version 0.5.2 shows no issues.&lt;br /&gt;&lt;br /&gt;I hope that I'll get my hands on a Mac OS X in the near future and try to debug this issue. If you have one, please contact me.&lt;br /&gt;&lt;br /&gt;In the next week, I won't have any time for the project, but I hope to start working on it on July.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2005239310785488917-282398093821227409?l=edumips64.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edumips64.blogspot.com/feeds/282398093821227409/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://edumips64.blogspot.com/2011/06/status-update-on-053.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/282398093821227409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/282398093821227409'/><link rel='alternate' type='text/html' href='http://edumips64.blogspot.com/2011/06/status-update-on-053.html' title='Status update on 0.5.3'/><author><name>Andrea Spadaccini</name><uri>https://profiles.google.com/100649395018186034267</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-_-VuVr6VupY/AAAAAAAAAAI/AAAAAAAAB68/1VkShREcwDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2005239310785488917.post-4546608284988686327</id><published>2011-05-23T08:03:00.000-07:00</published><updated>2011-05-23T08:03:56.488-07:00</updated><title type='text'>Profiling performance issues</title><content type='html'>After some recent changes to the logging code and to the help system, I noticed that the startup of the simulator and its normal operations were &lt;b&gt;considerably&lt;/b&gt;&amp;nbsp;slower than the older version. After a bit of search by trial-and-error, I told to myself that I had to use a more scientific method and try to profile the application with a profiler.&lt;br /&gt;&lt;br /&gt;So I started searching for a profiler for Java, and I found the&amp;nbsp;&lt;a href="http://www.yourkit.com/"&gt;YourKit Java Profiler&lt;/a&gt;, and it seemed to be what I was searching for. I briefly tried it and, thanks to the "HotSpot" feature, I immediately found a bottleneck (formatting the log messages even when they are discarded), so I asked them if they would provide free licenses for open source developers; i then discovered that&amp;nbsp;YourKit is kindly supporting open source projects with free licenses of its full-featured Java Profiler.&lt;br /&gt;&lt;br /&gt;Yourkit profilers&amp;nbsp;are produced by YourKit, LLc: they produce both a&amp;nbsp;&lt;a href="http://www.yourkit.com/download/index.jsp"&gt;Java&lt;/a&gt;&amp;nbsp;and a &lt;a href="http://www.yourkit.com/dotnet/download/index.jsp"&gt;.NET&lt;/a&gt;&amp;nbsp;profiler. Of course I only briefly tried the Java profiler, and I can tell you that it was really easy to spot that obvious bottleneck. I'm going to spend some time to profile EduMIPS64 and remove the most prominent bottlenecks.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2005239310785488917-4546608284988686327?l=edumips64.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edumips64.blogspot.com/feeds/4546608284988686327/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://edumips64.blogspot.com/2011/05/profiling-performance-issues.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/4546608284988686327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/4546608284988686327'/><link rel='alternate' type='text/html' href='http://edumips64.blogspot.com/2011/05/profiling-performance-issues.html' title='Profiling performance issues'/><author><name>Andrea Spadaccini</name><uri>https://profiles.google.com/100649395018186034267</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-_-VuVr6VupY/AAAAAAAAAAI/AAAAAAAAB68/1VkShREcwDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2005239310785488917.post-3369647426958705229</id><published>2011-04-23T08:04:00.000-07:00</published><updated>2011-05-05T03:34:28.620-07:00</updated><title type='text'>Fixing the help system</title><content type='html'>Currently, the EduMIPS64 user documentation is in bad shape. There are two different sources of documentation:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The PDF manual, built from LaTeX files;&lt;/li&gt;&lt;li&gt;The in-application help, made by (.. drum roll ..) &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;text files&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Both help sources are available in English and Italian. But this diversity means that there are two (actually, four) different places to update; moreover, the in-application help is really not adequate and a bit too simple.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Some time ago, we tried porting the help system to JavaHelp, but we didn't finish the porting and had some trouble in properly converting LaTeX to HTML. Moreover, JavaHelp seems to be dead.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I&amp;nbsp;&lt;a href="http://stackoverflow.com/questions/5608231/user-manual-for-java-software-in-application-help-pdf"&gt;asked a question on Stack Overflow&lt;/a&gt;, and I got two answers:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;convert LaTeX to ePub and embed an open source ePub viewer;&lt;/li&gt;&lt;li&gt;use RTF in a JTextPane&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;To summarize, our requirements for the help system are the following:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;single source, multiple outputs (PDF, in-application help);&lt;/li&gt;&lt;li&gt;in-application viewer&lt;/li&gt;&lt;li&gt;&lt;i&gt;optional &lt;/i&gt;search in the in-application help&lt;/li&gt;&lt;li&gt;&lt;i&gt;optional&lt;/i&gt;&amp;nbsp;navigation pane in the in-application help&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I have been playing a bit with the&amp;nbsp;&lt;a href="http://sphinx.pocoo.org/"&gt;Sphinx&lt;/a&gt;&amp;nbsp;documentation system, and I got two good PDF and single-html outputs, but then the problem was to display HTML in the application. The JEditorPane widget has some basic support for HTML and CSS, but it is way too basic. I'd had to heavily customize the output of Sphinx and I don't want to spend much time on it. Further, Using a basic viewer I'd drop the two optional requirements (search and navigation), or I'd have to code it- boring.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So we are going to try the LaTeX -&amp;gt; epub road, hoping that it works out nicely. In our idea, the new help system should be the only new feature in EduMIPS64 0.5.3.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;EDIT:&lt;/b&gt;&amp;nbsp;We settled with converting the documentation to &lt;a href="http://docutils.sourceforge.net/rst.html"&gt;reStructured Text&lt;/a&gt;&amp;nbsp;and using Sphinx to output both the PDF and a multi-page HTML document, using the epub HTML theme; this HTML docs were then processed with&amp;nbsp;&lt;a href="http://sourceforge.net/projects/jhelpdev/"&gt;jHelpDev&lt;/a&gt;&amp;nbsp;to build a help set for&amp;nbsp;&lt;a href="http://javahelp.java.net/"&gt;JavaHelp&lt;/a&gt;, that even if it is not actively developed, seems to work well - maybe it is a bit slow but works. So probably 0.5.3 will have in-app help based on JavaHelp and with the same contents of the PDF manual.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2005239310785488917-3369647426958705229?l=edumips64.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edumips64.blogspot.com/feeds/3369647426958705229/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://edumips64.blogspot.com/2011/04/fixing-help-system.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/3369647426958705229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/3369647426958705229'/><link rel='alternate' type='text/html' href='http://edumips64.blogspot.com/2011/04/fixing-help-system.html' title='Fixing the help system'/><author><name>Andrea Spadaccini</name><uri>https://profiles.google.com/100649395018186034267</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-_-VuVr6VupY/AAAAAAAAAAI/AAAAAAAAB68/1VkShREcwDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2005239310785488917.post-8418138346323776971</id><published>2011-04-10T09:34:00.000-07:00</published><updated>2011-04-10T09:34:50.032-07:00</updated><title type='text'>Improving testability</title><content type='html'>There are a lot of features that can be integrated or implemented, but we feel that the first thing to do is to create a test suite, in order to be fairly confident that when we change something we do not break anything! After all, people use EduMIPS64 during their exams, and I don't want that someone gets a bad grade (and consequently tries to kill me) because of bad code.&lt;br /&gt;&lt;br /&gt;A CPU simulator can be tested in many ways. The main decision we have to make is whether we should do black-box testing (overall functionality) or white-box testing (Java classes, individual or in small sets). So we looked at other CPU simulators in order to see how they solved this problem.&lt;br /&gt;&lt;br /&gt;We've been looking at WinMIPS64, WinDLX and DLXView, but found no answer to our questions.&lt;br /&gt;&lt;br /&gt;But when we turned to the&amp;nbsp;&lt;a href="http://spimsimulator.sourceforge.net/"&gt;SPIM MIPS32 Simulator&lt;/a&gt;, we found a very rich test suite. It is not surprising, as its author,&amp;nbsp;&lt;a href="http://pages.cs.wisc.edu/~larus/larus.html"&gt;James Larus&lt;/a&gt;, is very smart and wrote a really good presentation on&amp;nbsp;&lt;a href="http://pages.cs.wisc.edu/~larus/Talks/why_real/index.htm"&gt;Why write real software in Academia?&lt;/a&gt;&amp;nbsp;(suggested reading for people in academia who happen to write software). The simulator is also&amp;nbsp;featured in&amp;nbsp;&lt;a href="http://pages.cs.wisc.edu/~larus/HP_AppA.pdf"&gt;Appendix A&lt;/a&gt;&amp;nbsp;of Hennessy &amp;amp; Patterson's "Computer Architecture: A quantitative approach", a reference book in the field, so it is definitely a good reference and inspiration source.&lt;br /&gt;&lt;br /&gt;The Tests directory of SPIM contains 8 assembly test files that, together, amount to ~8500 lines of testing code. It is assembly code, so it is black-box testing.&lt;br /&gt;&lt;br /&gt;We can try to reuse some of them, skipping some features (like FPU) and writing some new tests, as we implement a superset of their instruction set, even if the computation model is a bit different (we don't have memory/mapped IO, control registers and other few things).&lt;br /&gt;&lt;br /&gt;There is a problem, however: EduMIPS64 is meant to be run as a desktop interactive application, and cannot be run in a CLI and in batch mode.&lt;br /&gt;&lt;br /&gt;So we are trying to remove the few dependencies that the core of the simulator has with respect to the User Interface, that are poor design choices, and write a very small CLI frontend for the core, so that the CPU features can be tested without running the UI.&lt;br /&gt;&lt;br /&gt;After that, we will try to port some testing code from SPIM to EduMIPS64, adding our own tests.&lt;br /&gt;&lt;br /&gt;We will then be ready to integrate and add features to the simulator, knowing that we have a safety net that will catch most of the errors and will allow us to write code without breaking the core features in any (obvious) way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2005239310785488917-8418138346323776971?l=edumips64.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edumips64.blogspot.com/feeds/8418138346323776971/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://edumips64.blogspot.com/2011/04/improving-testability.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/8418138346323776971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/8418138346323776971'/><link rel='alternate' type='text/html' href='http://edumips64.blogspot.com/2011/04/improving-testability.html' title='Improving testability'/><author><name>Andrea Spadaccini</name><uri>https://profiles.google.com/100649395018186034267</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-_-VuVr6VupY/AAAAAAAAAAI/AAAAAAAAB68/1VkShREcwDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2005239310785488917.post-182876031362474692</id><published>2011-04-06T05:31:00.000-07:00</published><updated>2011-04-06T05:44:40.403-07:00</updated><title type='text'>State of the EduMIPS64 code base</title><content type='html'>&lt;div&gt;In 2006, a small&amp;nbsp;group of undergraduate students at the University of Catania was taking a course in Computer Architecture; they were not satisfied by existing MIPS64 simulators, so they decided to design and write their own simulator.&amp;nbsp;They called it EduMIPS64 (web site: &lt;a href="http://www.edumips.org/"&gt;www.edumips.org&lt;/a&gt;), and it was initially conceived as an improved Java clone of&amp;nbsp;&lt;a href="http://www.computing.dcu.ie/~mike/winmips64.html"&gt;WinMIPS64&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Most of the development happened between April and October 2006. Then, development slowed down a bit because the main functionalities were working and the simulator had been adopted as the official tool for Computer Architecture courses at the University of Catania.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;There have been a moderate but constant activity through all 2007 and then, finally, in 2008 development came to an halt. The simulator was more mature, but many things still need improvement. Some important features, like FPU support and branch delay slot, have been developed but not released because the code needed to be polished, documented and tested.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This blog post wants to take a snapshot of the current state of the EduMIPS64 code base, in order to facilitate future development efforts.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;The current stable version&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;The last version of EduMIPS64, 0.5.2, was released on 17th April of 2008, and like version 0.5.1 it is mainly a bug-fix release. Version 0.5 was the last major version, i.e. a version that introduced new features (namely, MIPS32 instructions and a few other things).&lt;br /&gt;&lt;br /&gt;It can be considered quite stable, as the simulator is routinely used at least at the University of Catania for Computer Architecture exams, and no bugs were reported in the last 3 years.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;The trunk&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;The trunk contains an implementation of the FPU, with a complete FP instruction set, visual representation of FP-related sections of the pipeline.&lt;br /&gt;Moreover, it contains a (non-working) attempt to add in the help a conversion to HTML of the PDF manual.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;The branches&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;delayslot&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;: &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;contains an implementation of the&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Branch_delay_slot"&gt;Branch delay slot&lt;/a&gt;;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;editor&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;contains a (very) basic prototype of a built-in editor;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;new_parser&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;: &amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;a re-engineered parser written to replace the default one, that is difficult to mantain. It was developed as a student project for a Compilers course;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;cache&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;: &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;a re-engineered parser written to replace the one written during the development&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;0.5&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;branch where development of the 0.5 series should go&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Of these branches,&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;delayslot&lt;/span&gt;,&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;new_parser&lt;/span&gt;&amp;nbsp;and&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;cache&lt;/span&gt;&amp;nbsp;are the ones that most likely will be included in future stable releases.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;A note on testability&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;One of the problems of the EduMIPS64 code base is the lack of automated testing. When we developed it, we were mostly concerned with making it work, and as students it was an ambitious project. We worked day and night and fixed issues when they were raised, either by developers or by users, but we did not fully understand some basic concepts like unit testing, separation of intents, modularity etc..&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Future development work needs to be addressed to a suite of unit tests that will work as a safety net for regressions as the development goes on.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;Future development&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;There are many features that are almost ready but have been never released to the public, like the FPU or the branch delay slot.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;It is likely that a new version of EduMIPS64, 0.5.3, will be released shortly. It will include some bug fixes and the ability to enable the branch delay slot, in order to get some user feedbacks on it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span style="font-size: large;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;After this, probably a 0.9 version with FPU will be released, and this version will also need to be heavily tested by users before a 1.0 stable version will be released.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2005239310785488917-182876031362474692?l=edumips64.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://edumips64.blogspot.com/feeds/182876031362474692/comments/default' title='Commenti sul post'/><link rel='replies' type='text/html' href='http://edumips64.blogspot.com/2011/04/state-of-edumips64-code-base.html#comment-form' title='0 Commenti'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/182876031362474692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2005239310785488917/posts/default/182876031362474692'/><link rel='alternate' type='text/html' href='http://edumips64.blogspot.com/2011/04/state-of-edumips64-code-base.html' title='State of the EduMIPS64 code base'/><author><name>Andrea Spadaccini</name><uri>https://profiles.google.com/100649395018186034267</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-_-VuVr6VupY/AAAAAAAAAAI/AAAAAAAAB68/1VkShREcwDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
