<?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-34311656</id><updated>2011-08-16T20:52:44.833-05:00</updated><title type='text'>MIT 6.035</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-34311656.post-389941436141728978</id><published>2006-12-12T17:35:00.000-05:00</published><updated>2006-12-12T17:41:29.334-05:00</updated><title type='text'>HKN Underground Guide evaluations</title><content type='html'>The Underground Guide student evaluations are now open.  Visit them &lt;a href="https://sixweb.mit.edu/evaluate/6.035-f2006"&gt;here&lt;/a&gt; for 6.035.&lt;br /&gt;&lt;br /&gt;Please complete your evaluation before 11:59P December 22.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-389941436141728978?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/389941436141728978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=389941436141728978' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/389941436141728978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/389941436141728978'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/12/hkn-undergraduate-guide-evaluations.html' title='HKN Underground Guide evaluations'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-8619473147753112014</id><published>2006-12-12T17:32:00.000-05:00</published><updated>2006-12-12T17:33:27.471-05:00</updated><title type='text'>Quiz 3 Graded</title><content type='html'>Quiz 3 has been graded.  You will get your quiz back tomorrow after class.  The average (and median) was 68.  The standard deviation was 14.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-8619473147753112014?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/8619473147753112014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=8619473147753112014' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/8619473147753112014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/8619473147753112014'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/12/quiz-3-graded.html' title='Quiz 3 Graded'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-3120631234697799866</id><published>2006-12-12T14:20:00.000-05:00</published><updated>2006-12-12T14:23:52.049-05:00</updated><title type='text'>Small bug in data parallelization library (libderby.a)</title><content type='html'>I fixed a small bug in the data-parallelization library that prevented one group's code from working.  Since no other groups emailed me, I'm assuming the problem was contained to this one group.  The fix is installed in the same location as the old file, so you don't have to do anything.  Let me know if you experience problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-3120631234697799866?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/3120631234697799866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=3120631234697799866' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/3120631234697799866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/3120631234697799866'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/12/small-bug-in-data-parallelization.html' title='Small bug in data parallelization library (libderby.a)'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-1381335068867659414</id><published>2006-12-11T18:37:00.000-05:00</published><updated>2006-12-11T20:47:50.553-05:00</updated><title type='text'>Parallelization differences across machines</title><content type='html'>First off, with the new benchmarking library, you can benchmark on chocura.&lt;br /&gt;&lt;br /&gt;I have noticed big differences between the parallelization speedups of silver, chocura, and tyner.  For a small 4-thread test program, silver gets about a 2.9x speedup over sequential code (executed on silver).  Tyner gets a 1.8x speedup over sequential code (executed on tyner).  Chocura gets a 3.7x speedup for the same code over sequential execution on chocura.&lt;br /&gt;&lt;br /&gt;Based on my experiences over the last couple of days, I'm going to use chocura for the derby.  It seems to be the most stable.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-1381335068867659414?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/1381335068867659414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=1381335068867659414' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/1381335068867659414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/1381335068867659414'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/12/parallelization-differences-across.html' title='Parallelization differences across machines'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-2953153646903054613</id><published>2006-12-08T03:04:00.000-05:00</published><updated>2006-12-12T11:02:09.071-05:00</updated><title type='text'>New benchmarking library for the derby!</title><content type='html'>After noticing that the current benchmarking infrastructure produces some inconsistencies when executing multi-threaded benchmarks, I have implemented a new benchmarking library for the derby.  You can use this library now for benchmarking.&lt;br /&gt;&lt;br /&gt;Don't worry, the implementation decisions that you arrived at using the current (old) benchmarking infrastructure are still valid.  I have only noticed inconsistencies when running multiple threads in the current system.&lt;br /&gt;&lt;br /&gt;You can continue to use the current (old) library (lib6035.a) but note that it has problems with multi-threaded benchmarks.&lt;br /&gt;&lt;br /&gt;The new library is named libderby.a and is located in /u/mgordon/6035/lib64.  The new library interface is similar to the old interface.  There are two calls: &lt;span style="font-family:courier new;"&gt;start_caliper()&lt;/span&gt;and &lt;span style="font-family:courier new;"&gt;end_caliper()&lt;/span&gt;.  Wrap these around the code you would like to benchmark.   The only difference from the old library is that the code will not be benchmarked without a caliper defined.  As before you can place them in a callout in your decaf source code.&lt;br /&gt;&lt;br /&gt;Using the new library, the assemble command is simpler, for example:&lt;br /&gt;&lt;br /&gt;gcc4 emboss.s -pthread -lderby -L/u/mgordon/6035/lib64 -o emboss&lt;br /&gt;&lt;br /&gt;No need for that papi library from before.  When you execute your code (assuming that you have added a call to start_caliper() and end_caliper()),  a brief message will print out, for example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$ emboss&lt;br /&gt;Timer: 276864 usecs&lt;br /&gt;$&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:georgia;"&gt;This tells you how many usecs (microseconds) it took for the code wrapped in the timer to execute.   We will use this library during the derby to determine the ranking.  The calls to start_caliper and end_caliper will be in the derby program when it is distributed on Monday.&lt;br /&gt;&lt;br /&gt;Sorry about this change so late in the game, but it should not be too much of a hassle to switch to the new library if your are harnessing data parallelism.  I just want to make sure that the derby results are as accurate as possible.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-2953153646903054613?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/2953153646903054613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=2953153646903054613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/2953153646903054613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/2953153646903054613'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/12/new-benchmarking-library-for-derby.html' title='New benchmarking library for the derby!'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-5868997515163331888</id><published>2006-12-05T23:14:00.000-05:00</published><updated>2006-12-05T23:26:51.084-05:00</updated><title type='text'>Advice for Optimizer final write-up</title><content type='html'>Here are some points to think about:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Use the provided programs to substantiate your implementation decisions.  Benchmark the provided programs on the target architecture.  Hand-implement the transformation first.  The target architecture is complex to say the least.  Don't waste time with ineffectual transformations.&lt;/li&gt;&lt;li&gt;Cover all of the transformations discussed in class, at the very least qualitatively, given the benchmark programs and the target architecture.&lt;/li&gt;&lt;li&gt;I would like to see an analysis of each implemented optimization (you can group optimizations if you feel they are symbiotic).&lt;/li&gt;&lt;li&gt;Discuss the reasons for you benchmarking results given your knowledge of the target architecture (look at my last recitation).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Describe your full optimizations option and the ideas/experiments behind the implementation.&lt;/li&gt;&lt;li&gt;Analyze your generated assembly.  Look for non-traditional peephole optimizations.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-5868997515163331888?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/5868997515163331888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=5868997515163331888' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/5868997515163331888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/5868997515163331888'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/12/advice-for-optimizer-final-write-up.html' title='Advice for Optimizer final write-up'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-4451303428762001130</id><published>2006-11-27T21:14:00.000-05:00</published><updated>2006-11-27T21:15:42.970-05:00</updated><title type='text'>Appendix to Optimizer Project Handout</title><content type='html'>The documentation for the data-parallelization library are posted on the website. &lt;a href="http://web.mit.edu/6.035/www/handouts-2006/Data-Parallelization-Library.html"&gt;Link &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-4451303428762001130?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/4451303428762001130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=4451303428762001130' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/4451303428762001130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/4451303428762001130'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/appendix-to-optimizer-project-handout.html' title='Appendix to Optimizer Project Handout'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-2261640307784503275</id><published>2006-11-27T20:35:00.000-05:00</published><updated>2006-11-27T20:38:31.868-05:00</updated><title type='text'>The evil enter instruction</title><content type='html'>From your classmate Zev:&lt;br /&gt;&lt;br /&gt;After some experimentation, we found that the enter instruction seems to be broken (using the push, mov, sub equivalent works fine).  Some googling turned up the following discussion group thread:&lt;a onclick="return top.js.OpenExtLink(window,event,this)" href="http://groups.google.co.nz/group/comp.os.linux.development.system/browse_thread/thread/a057249198598933/a4f5251c9ef1e7a2?#a4f5251c9ef1e7a2" target="_blank"&gt; &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onclick="return top.js.OpenExtLink(window,event,this)" href="http://groups.google.co.nz/group/comp.os.linux.development.system/browse_thread/thread/a057249198598933/a4f5251c9ef1e7a2?#a4f5251c9ef1e7a2" target="_blank"&gt;http://groups.google.co.nz&lt;wbr&gt;/group/comp.os.linux.development.system/browse_thread/thread&lt;wbr&gt;/a057249198598933/a4f5251c9ef1&lt;wbr&gt;e7a2?#a4f5251c9ef1e7a2&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Everything is pretty much summed up with Linus' reply at the end. Bottom line: enter can cause segfaults on Linux and is a lot slower than its equivalent.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-2261640307784503275?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/2261640307784503275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=2261640307784503275' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/2261640307784503275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/2261640307784503275'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/some.html' title='The evil enter instruction'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-2903245659598675390</id><published>2006-11-16T12:26:00.000-05:00</published><updated>2006-11-16T12:35:07.671-05:00</updated><title type='text'>72 + 16 = 96 (Explanation for the curious)</title><content type='html'>Yeah, um, that was me trying to hid some stuff from you and forgetting what I was glossing over.  If you are interested:&lt;br /&gt;&lt;br /&gt;Some x86-64 instructions are very complex. They are translated into simpler operations in hardware.  In recitation we saw that a mov that references memory is translated into multiple simple operations in the underlying hardware, the mov and the memory reference. The mov is dependent upon the memory reference.  These smaller instructions are called micro-operations. &lt;br /&gt;&lt;br /&gt;There are 16 architectural registers and 72 re-order buffer entries.  That is 88 registers.  But there are also 8 hidden registers that are used for shuffling values between micro-operations.  These are not part of architectural state (the state the asm programmer sees) but they are needed to shuffle values between micro-ops when a dependent micro-op is evicted from the re-order buffer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-2903245659598675390?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/2903245659598675390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=2903245659598675390' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/2903245659598675390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/2903245659598675390'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/72-16-96-explanation-for-curious.html' title='72 + 16 = 96 (Explanation for the curious)'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-6504235370191397284</id><published>2006-11-16T12:14:00.000-05:00</published><updated>2006-11-16T12:26:11.542-05:00</updated><title type='text'>Running without benchmarking</title><content type='html'>The new lib6035.a and the new assemble require that you use the 'benchmark' script to run your code.  If don't you want to benchmark, maybe you are just debugging, use the original lib6035.a in /mit/6.035/provided/optimizer/lib and compile with the old command:&lt;br /&gt;&lt;br /&gt;gcc4 example.s -L. -l6035 -pthread -o example&lt;br /&gt;cc example.s -L. -l6035 -pthread -o example&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-6504235370191397284?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/6504235370191397284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=6504235370191397284' title='23 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/6504235370191397284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/6504235370191397284'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/running-without-benchmarking.html' title='Running without benchmarking'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>23</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-3483576939027347342</id><published>2006-11-15T23:48:00.000-05:00</published><updated>2006-11-16T12:38:31.621-05:00</updated><title type='text'>New benchmarking infrastructure!</title><content type='html'>&lt;span style="font-family:georgia;"&gt;With help from our sys-admin (thanks Mike!), I have completed the new, much much more accurate benchmarking infrastructure.  You have to make some changes to use it.&lt;br /&gt;&lt;br /&gt;First, set your LD_LIBRARY_PATH environment variable to include /u/mgordon/6035/lib64&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-family: georgia;"&gt;For bash:&lt;/span&gt;&lt;br /&gt;export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/u/mgordon/6035/lib64&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: georgia;"&gt;For csh:&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/u/mgordon/6035/lib64&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have placed a new version of the 6035 library in /u/mgordon/6035/lib64, you don't need&lt;br /&gt;to copy it from there.&lt;br /&gt;&lt;br /&gt;Now you have to compile things a bit differently, new compile:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;gcc4 program.s -pthread -lpapiex -l6035 -L/u/mgordon/6035/lib64 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Just in case your are curious, papiex is the library on which I built our benchmarking infrastructure.  It allows us to get access to performance counters on the CPU!  Very accurate.&lt;br /&gt;&lt;br /&gt;----&lt;br /&gt;&lt;br /&gt;You can use /u/mgordon/6035/bin/benchmark to get the cycle count information for your program after you have compiled it.&lt;br /&gt;&lt;br /&gt;Use 'benchmark program' to get the cycle count for program.&lt;br /&gt;&lt;br /&gt;Here is some sample output:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;libmonitor debug: (P20071,T0x0) monitor_fini_process()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PapiEx Version:         0.99rc2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Executable:             /u/mgordon/6.035/example/loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Processor:              AMD K8 Revision C&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Clockrate:              1993.465942&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Parent Process ID:      20064&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Process ID:             20071&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Hostname:               tyner&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Options:                PAPI_TOT_CYC,NO_WRITE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Domain:                 User&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Real usecs:             125&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Real cycles:            241852&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Proc usecs:             122&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Proc cycles:            239896&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PAPI_TOT_CYC:           135670 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Event descriptions:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Event: PAPI_TOT_CYC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Derived: No&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Short Description: Total cycles&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Long Description: Total cycles&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Developer's Notes: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Start:                  Wed Nov 15 23:44:20 2006&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Finish:                 Wed Nov 15 23:44:20 2006&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;libmonitor debug: (P20071,T0x0) monitor_fini_library()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;------&lt;br /&gt;&lt;br /&gt;What to notice:&lt;br /&gt;*First line give the program you ran (in this case "loop").&lt;br /&gt;*The line your are interested in:  &lt;span style="font-family:courier new;"&gt;PAPI_TOT_CYC:           135670&lt;/span&gt;&lt;br /&gt;this is the number of user cycles that your program took to run.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;----&lt;br /&gt;&lt;br /&gt;You can also define a single "caliper" in the code.  This is a section in your code that you would like detailed information about. Use &lt;span style="font-family:courier new;"&gt;start_caliper()&lt;/span&gt; to define the beginning of a section and &lt;span style="font-family:courier new;"&gt;end_caliper()&lt;/span&gt; to define the end of a section.  These functions are defined in lib6035.a. So you can use a callout for each in decaf code or just place it in your assembly code (adhering to calling convention of course).&lt;br /&gt;&lt;br /&gt;With a caliper defined, the output would look like:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;libmonitor debug: (P20167,T0x0) monitor_fini_process()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PapiEx Version:         0.99rc2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Executable:             /u/mgordon/6.035/example/loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Processor:              AMD K8 Revision C&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Clockrate:              1993.465942&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Parent Process ID:      20156&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Process ID:             20167&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Hostname:               tyner&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Options:                PAPI_TOT_CYC,NO_WRITE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Domain:                 User&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Real usecs:             435&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Real cycles:            860899&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Proc usecs:             127&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Proc cycles:            249792&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PAPI_TOT_CYC:           150002&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Caliper 1: &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Executions:             1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Real usecs:             16&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Real cycles:            32333&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Proc usecs:             16&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Proc cycles:            32328&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        PAPI_TOT_CYC:           32226   ***This is the cycle count&lt;br /&gt;&lt;/span&gt;                                                                                                                                               &lt;span style="font-family:courier new;"&gt;for your caliper&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Event descriptions:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Event: PAPI_TOT_CYC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Derived: No&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Short Description: Total cycles&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Long Description: Total cycles&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Developer's Notes: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Start:                  Wed Nov 15 23:51:48 2006&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Finish:                 Wed Nov 15 23:51:48 2006&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;libmonitor debug: (P20167,T0x0) monitor_fini_library()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Let me know if there are any problems.  Actually, let me know if it works for you!  It is somewhat untested for anyone but me.&lt;br /&gt;&lt;br /&gt;Mike&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-3483576939027347342?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/3483576939027347342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=3483576939027347342' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/3483576939027347342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/3483576939027347342'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/new-benchmarking-infrastructure.html' title='New benchmarking infrastructure!'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-6440459873321154975</id><published>2006-11-13T15:02:00.000-05:00</published><updated>2006-11-13T15:05:10.158-05:00</updated><title type='text'>New option needed when assembling!</title><content type='html'>Although it has not been discussed, the new 6035 static library (lib6035.a) includes the data parallelization library.  Even if you are not data parallelizing, you have to compile the library with the -pthread option:&lt;br /&gt;&lt;br /&gt;gcc4 example.s -L. -l6035 -pthread -o example&lt;br /&gt;cc example.s -L. -l6035 -pthread -o example&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-6440459873321154975?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/6440459873321154975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=6440459873321154975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/6440459873321154975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/6440459873321154975'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/new-option-needed-when-assembling.html' title='New option needed when assembling!'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-6024753793191960983</id><published>2006-11-12T18:40:00.000-05:00</published><updated>2006-11-12T18:42:18.862-05:00</updated><title type='text'>Quiz 2</title><content type='html'>Quiz 2 has been graded.  You will get your quiz back during Monday's Lecture (Nov. 13).  The class average is 77 and the standard deviation is 13.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-6024753793191960983?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/6024753793191960983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=6024753793191960983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/6024753793191960983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/6024753793191960983'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/quiz-2.html' title='Quiz 2'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116284279393173456</id><published>2006-11-06T14:48:00.000-05:00</published><updated>2006-11-12T18:40:07.111-05:00</updated><title type='text'>Quiz 2 Review Notes</title><content type='html'>I hope the quiz review helped. You can find my typed notes &lt;a href="http://cag.csail.mit.edu/%7Emgordon/quiz2_review.pdf"&gt;here&lt;/a&gt;.  They are a bit rough (I hate Word, should have used latex) but they should help you to understand dataflow analysis.  If you have any questions, you can email me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116284279393173456?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116284279393173456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116284279393173456' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116284279393173456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116284279393173456'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/quiz-2-review-notes.html' title='Quiz 2 Review Notes'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116267479642516536</id><published>2006-11-04T16:00:00.000-05:00</published><updated>2006-11-12T18:40:07.042-05:00</updated><title type='text'>Quiz 2 Information</title><content type='html'>The second quiz is schedule for Tuesday during class time.&lt;br /&gt;&lt;br /&gt;Remember, it is open book/notes!&lt;br /&gt;&lt;br /&gt;I have posted a practice exam and solutions on the web site.  You can also look at &lt;a href="http://web.mit.edu/6.035/www/handouts-2005/10-practice-quiz.pdf"&gt;last year's practice quiz&lt;/a&gt;, but be careful with problem 4, there are bugs in it.&lt;br /&gt;&lt;br /&gt;I am going to give a quiz review during class on Monday (11am, normal room).  I will answer any questions and go over the material (mostly dataflow analysis).&lt;br /&gt;&lt;br /&gt;The material:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Assembly Language&lt;/li&gt;&lt;li&gt;Low-level intermediate representation (3-address code, etc.)&lt;/li&gt;&lt;li&gt;Translation from high-level representation to low-level (example, for-loop-&gt;assembly)&lt;/li&gt;&lt;li&gt;Control Flow Analysis and Basic Blocks&lt;/li&gt;&lt;li&gt;Intra-basic-block optimizations (value numbering, etc.)&lt;/li&gt;&lt;li&gt;Dataflow Analysis including transfer functions, confluence, Global CSE, copy-prop, dce, liveness, and the theoretical framework (lattices, transfer functions, etc.)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116267479642516536?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116267479642516536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116267479642516536' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116267479642516536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116267479642516536'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/quiz-2-information.html' title='Quiz 2 Information'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116258613030463931</id><published>2006-11-03T15:25:00.000-05:00</published><updated>2006-11-12T18:40:06.754-05:00</updated><title type='text'>Static Single-Assignment (SSA) Readings</title><content type='html'>For those interested in SSA form for their compiler, I recommend you first look at Chapter 19 of the Tiger Book (2nd ed.).    This is good introduction to SSA.  After this chapter you should be able to decide if you want to use SSA.&lt;br /&gt;&lt;br /&gt;The Arc Book contains the most thorough coverage of SSA.  Chapter 9.3 focuses on conversion to SSA and Chapter 10 discusses transformations in an SSA framework. &lt;br /&gt;&lt;br /&gt;The Whale Book and &lt;em&gt;Optimizing Compilers for Modern Architectures&lt;/em&gt; include brief descriptions of SSA also, but they are very limited.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116258613030463931?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116258613030463931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116258613030463931' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116258613030463931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116258613030463931'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/static-single-assignment-ssa-readings.html' title='Static Single-Assignment (SSA) Readings'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116241069255427226</id><published>2006-11-01T14:49:00.000-05:00</published><updated>2006-11-12T18:40:06.673-05:00</updated><title type='text'>Extension for Dataflow Optimization Project</title><content type='html'>Design Document: Friday 11/3 @ 5pm (either email me the doc or place in class inbox)&lt;br /&gt;&lt;br /&gt;Implementation and Design: Sunday 11/12 @ 11:59pm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116241069255427226?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116241069255427226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116241069255427226' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116241069255427226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116241069255427226'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/11/extension-for-dataflow-optimization.html' title='Extension for Dataflow Optimization Project'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116226580886786354</id><published>2006-10-30T22:35:00.000-05:00</published><updated>2006-11-12T18:40:06.581-05:00</updated><title type='text'>Dataflow optimization test cases are posted</title><content type='html'>I have posted the test cases for global CSE.  I have not provided the output because you should check the output against your unoptimized compiler flow in your regression infrastructure.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116226580886786354?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116226580886786354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116226580886786354' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116226580886786354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116226580886786354'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/10/dataflow-optimization-test-cases-are.html' title='Dataflow optimization test cases are posted'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116184166788050536</id><published>2006-10-26T00:46:00.000-05:00</published><updated>2006-11-12T18:40:06.510-05:00</updated><title type='text'>16-qsort.dcf</title><content type='html'>This test originally contained a semantic error.  The partition method did not contain a return statement on all paths of control.  It is now fixed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116184166788050536?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116184166788050536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116184166788050536' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116184166788050536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116184166788050536'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/10/16-qsortdcf.html' title='16-qsort.dcf'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116119775287015042</id><published>2006-10-18T13:53:00.000-05:00</published><updated>2006-11-12T18:40:06.426-05:00</updated><title type='text'>Assembler command-line</title><content type='html'>Like I mentioned previously, it looks like the order of arguments matters when assembling.  The following commands work for me on all the machines for compiling the example program given in the x86-64 architecture guide:&lt;br /&gt;&lt;br /&gt;cc example.s -L. -l6035 -o example&lt;br /&gt;gcc4 example.s -L. -l6035 -o example&lt;br /&gt;&lt;br /&gt;This assumes that lib6035.a is in the current directory.&lt;br /&gt;&lt;br /&gt;Let me know if you have any problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116119775287015042?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116119775287015042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116119775287015042' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116119775287015042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116119775287015042'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/10/assembler-command-line.html' title='Assembler command-line'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116119757616619925</id><published>2006-10-18T13:51:00.000-05:00</published><updated>2006-11-12T18:40:06.350-05:00</updated><title type='text'>Update on machines</title><content type='html'>gcc4 and java5 should now be on all the test machines.&lt;br /&gt;&lt;br /&gt;/usr/java/jre1.5.0_06&lt;br /&gt;&lt;br /&gt;$ gcc4 -v&lt;br /&gt;Using built-in specs.&lt;br /&gt;Target: x86_64-redhat-linux&lt;br /&gt;Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --with-gxx-include-dir=/usr&lt;div style="direction: ltr;"&gt;&lt;wbr&gt;/include/c++/3.4.3 --enable-libgcj-multifile --enable-languages=c,c++,java&lt;wbr&gt;,f95 --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm&lt;wbr&gt;/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux&lt;br /&gt;Thread model: posix&lt;br /&gt;gcc version 4.1.0 20060515 (Red Hat 4.1.0-18)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116119757616619925?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116119757616619925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116119757616619925' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116119757616619925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116119757616619925'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/10/update-on-machines.html' title='Update on machines'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116113022985631420</id><published>2006-10-17T19:05:00.000-05:00</published><updated>2006-11-12T18:40:06.280-05:00</updated><title type='text'>silver/tyner/chocura</title><content type='html'>Some notes on the machines:&lt;br /&gt;&lt;br /&gt;* You should try to use silver, tyner, or chocura.  Urth is a desktop machine that is not too powerful, but if it is free, use it.  It is not a multicore.&lt;br /&gt;&lt;br /&gt;* As of right now use 'cc' to assemble and link.  Note that cc is picky about the order of arguments, i.e.  you must issue something like "cc decaf.s lib6035.a -o decaf".  The library must come after the assembly file.  I'm going to install gcc4 soon.  This is the only version of gcc that has 64-bit support as far as I know.&lt;br /&gt;&lt;br /&gt;* These machines do not have java5 installed on them.  You can grab a copy yourself or wait for me to install one.  Hopefully tomorrow, but I cannot make any promises.  If you want to use eclipse, there is at least one group that got the 64-bit version to work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116113022985631420?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116113022985631420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116113022985631420' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116113022985631420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116113022985631420'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/10/silvertynerchocura.html' title='silver/tyner/chocura'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116112991866810348</id><published>2006-10-17T19:04:00.000-05:00</published><updated>2006-11-12T18:40:06.206-05:00</updated><title type='text'>Project Checkpoint Clarification</title><content type='html'>At 5pm on Thursday I am going to grab the tarball from your group locker.  Please name it according to the project specifications.  I would like you to write a brief document describing your low-level IR design, namely, the structures that are represented, how it is organized (tree or flat, 2 or 3 address code, etc).  I would like you to describe your compiler flow, i.e. how your are going to translate your HIR to your LIR and your LIR to asm.&lt;br /&gt;&lt;br /&gt;This should not be a rigorous document.  One page should suffice.  I just want to make sure that you understand the concepts and are not doing anything crazy.  Unless i find a problem with your design, you will not get any feedback on the document.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116112991866810348?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116112991866810348/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116112991866810348' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116112991866810348'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116112991866810348'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/10/project-checkpoint-clarification.html' title='Project Checkpoint Clarification'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-116097647482606283</id><published>2006-10-16T00:25:00.000-05:00</published><updated>2006-11-12T18:40:06.120-05:00</updated><title type='text'>Semantic Hidden Test legal-09.dcf</title><content type='html'>For the semantic phase, the hidden test case legal-09.dcf  was incorrect.  It contained an error where control reached the end of a non-void method.  If I marked the test case incorrect for your group, please see me to get 1.7 points back for the hidden test grade. &lt;br /&gt;&lt;br /&gt;I have since corrected the test case.  Thanks to Jeff for pointing this out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-116097647482606283?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/116097647482606283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=116097647482606283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116097647482606283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/116097647482606283'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/10/semantic-hidden-test-legal-09dcf.html' title='Semantic Hidden Test legal-09.dcf'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-115855434670555062</id><published>2006-09-17T23:36:00.000-05:00</published><updated>2006-11-12T18:40:06.058-05:00</updated><title type='text'>Line Numbers in the Parser</title><content type='html'>I received a question regarding how one can get line number (and&lt;br /&gt;column) information for tokens in the parser.  Note that this is not&lt;br /&gt;required for this phase of the project. &lt;br /&gt;&lt;br /&gt;This is not straightforward because the parser extracts the "value"&lt;br /&gt;field from the Symbol class when you label a terminal or non-terminal&lt;br /&gt;in the RHS of a production.  The other fields of ComplexSymbol are not&lt;br /&gt;available in the action code of the parser.&lt;br /&gt;&lt;br /&gt;The JFlex manual gives a solution to this problem.  I find it a bit&lt;br /&gt;distasteful but it works.  I will detail it below:&lt;br /&gt;&lt;br /&gt;In addition to the value field, the parser also extracts the left and&lt;br /&gt;right fields from the Symbol in the RHS of a production.  For example&lt;br /&gt;if you have:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;id ::= IDENTIFIER:Val&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can use Valleft and Valright in the action code.  For example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;id ::= IDENTIFIER:Val {: System.out.println(Valleft + " " + Valright); :} ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The default constructor for ComplexSymbol does not set the left and&lt;br /&gt;right fields of its superclass, Symbol.  We can use left and right to&lt;br /&gt;store the line and column of the token.  Our&lt;span style="font-family: courier new;"&gt; symbol(...)&lt;/span&gt; factory&lt;br /&gt;method in the scanner can explicitly set &lt;span style="font-family: courier new;"&gt;symbol.left&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;symbol.right&lt;/span&gt;&lt;br /&gt;(assuming &lt;span style="font-family: courier new;"&gt;symbol&lt;/span&gt; is the newly created ComplexSymbol is named symbol).&lt;br /&gt;The implementation should be straightforward.&lt;br /&gt;&lt;br /&gt;After the line number is available, we can use it while error reporting.&lt;br /&gt;&lt;br /&gt;(This is distasteful because this is not the intended use for the left&lt;br /&gt;and right fields.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-115855434670555062?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/115855434670555062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=115855434670555062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115855434670555062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115855434670555062'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/09/line-numbers-in-parser.html' title='Line Numbers in the Parser'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-115843243661733075</id><published>2006-09-16T13:46:00.000-05:00</published><updated>2006-11-12T18:40:05.981-05:00</updated><title type='text'>Scanner Output Inconsistency</title><content type='html'>Your classmate Zev found an inconsistency in the scanner output.&lt;br /&gt;There is an inconsistency between the output for char3 and char5&lt;br /&gt;regarding the line number the scanner records in the ComplexSymbol for&lt;br /&gt;an illegal character.&lt;br /&gt;&lt;br /&gt;The desired behavior is for the line number in the symbol for&lt;br /&gt;character literals to take the value of the *beginning* line of the&lt;br /&gt;char literal.  This only makes a difference for illegal char literals&lt;br /&gt;that are unterminated (meaning a newline is encountered before a&lt;br /&gt;closing ' ).  char3 is an example of this behavior.&lt;br /&gt;&lt;br /&gt;But char5 uses the ending line in the line field of the symbol.&lt;br /&gt;&lt;br /&gt;I have changed the provided output of char5 to reflect the beginning line.&lt;br /&gt;&lt;br /&gt;Since this is short notice and the difference is unimportant, I will&lt;br /&gt;accept either option from your scanner (ending line or beginning&lt;br /&gt;line).&lt;br /&gt;&lt;br /&gt;Let me know if there are any further problems. Sorry for the confusion&lt;br /&gt;and thank you Zev.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-115843243661733075?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/115843243661733075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=115843243661733075' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115843243661733075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115843243661733075'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/09/scanner-output-inconsistency.html' title='Scanner Output Inconsistency'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-115834886621157257</id><published>2006-09-15T14:30:00.000-05:00</published><updated>2006-11-12T18:40:05.904-05:00</updated><title type='text'>.05 is an Identifier!</title><content type='html'>You should note that .05 (and any other "floating point number" of the form .digit*) is an identifier.  Somewhat weird, and it confused me for a bit, but since the language does not include floating point numbers, it is fine. &lt;br /&gt;&lt;br /&gt;So we can have an statement like&lt;br /&gt;&lt;br /&gt;.5 = .7 + 6;&lt;br /&gt;&lt;br /&gt;Where, .5 and .7 are variables.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-115834886621157257?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/115834886621157257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=115834886621157257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115834886621157257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115834886621157257'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/09/05-is-identifier.html' title='.05 is an Identifier!'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-115834158395076639</id><published>2006-09-15T12:29:00.000-05:00</published><updated>2006-11-12T18:40:05.841-05:00</updated><title type='text'>Tabs in Char/Sring literals</title><content type='html'>&lt;span style="font-size:100%;"&gt;Your scanner should not allow tabs (depressing the "tab" key, not '\t')&lt;/span&gt;  in char literals and string literals.  Look at scanner test char9.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-115834158395076639?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/115834158395076639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=115834158395076639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115834158395076639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115834158395076639'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/09/tabs-in-charsring-literals.html' title='Tabs in Char/Sring literals'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-115828524943587570</id><published>2006-09-14T20:52:00.000-05:00</published><updated>2006-11-12T18:40:05.773-05:00</updated><title type='text'>Scanner Output</title><content type='html'>Question:&lt;br /&gt; &lt;div style="direction: ltr;"&gt;Do you have a comprehensive list somewhere of all the token strings and&lt;br /&gt;error strings that you expect?  Or can you at least guarantee that the&lt;br /&gt;public tests contain all of them?  It would suck if one of my error messages&lt;br /&gt;didn't match yours because I didn't know what it should look like.&lt;br /&gt;&lt;/div&gt;&lt;div style="direction: ltr;"&gt;&lt;span class="q"&gt;&lt;br /&gt;Answer:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Only the token strings that are listed in the sample scanner output&lt;br /&gt;are specified.  The names for any others you recognize are not&lt;br /&gt;specified and I don't know if the provided tests for the scanner are&lt;br /&gt;complete.  There is no list of the token strings.&lt;br /&gt;&lt;br /&gt;Don't worry about the exact format of any error messages that are not&lt;br /&gt;given in the sample output.  Just worry about catching as many errors&lt;br /&gt;in the scanner as you can, and try to match the output of the given&lt;br /&gt;tests. I will look closely at the scanner/parser output for the hidden&lt;br /&gt;tests and I will not simply diff the output against my scanner/parser.&lt;br /&gt;And also, if you really cannot match the output of the scanner&lt;br /&gt;perfectly, don't try too hard, I'll examine any tests that fail to&lt;br /&gt;match the output exactly.&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/34311656-115828524943587570?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/115828524943587570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=115828524943587570' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115828524943587570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115828524943587570'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/09/scanner-output.html' title='Scanner Output'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-115817705650429185</id><published>2006-09-13T14:43:00.001-05:00</published><updated>2006-11-12T18:40:05.705-05:00</updated><title type='text'>LALR(1)  Conflict Resolution</title><content type='html'>&lt;span style="font-family:courier new;"&gt;After class a question was raised regarding how the parser&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; can recognize a field declaration versus a method declaration because&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; they both start out with a type declaration and an identifier.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;I think I understand the confusion.  You should remember that an LALR(1) parser has one lookahead symbol to&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; decide which *state* it should transition into, but a state can&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; include more than one of the original productions.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;So during a parse:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;class Program {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    int f . ( &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;The parser should be in a state that "includes" both method declaration&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; (if there are no field decls) and field declaration and upon seeing&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; the "(" will move into a state for a method declaration.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;The trick is to delay the decision as to which rule should be&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;matched as long as possible. If you have the following rules:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;program -&gt; CLASS id LBRACE field_decl method_decl RBRACE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;field_decl -&gt; type id ... | ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;method_decl -&gt; type id LPAREN ... | ;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;You will get a conflict upon seeing a type.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;The parser will have to decide upon seeing a type whether it is a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;field_decl or a method_decl. But it cannot tell yet and you did not give it the option of delaying the decision until later and continuting in a state that includes both.&lt;br /&gt;&lt;br /&gt;You do not want&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; to limit the decisions that the parser must make early in the&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; parse. You need the early states to contain each option (i.e., whether there is a field_decl&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; or not).&lt;br /&gt;&lt;br /&gt;How can you re-write the grammar above to be conflict-free?&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;I hope this helps.  Let me know if there are still any problems.  I can write more on this&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; subject.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-115817705650429185?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/115817705650429185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=115817705650429185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115817705650429185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115817705650429185'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/09/lalr1-conflict-resolution.html' title='LALR(1)  Conflict Resolution'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-115811695737206623</id><published>2006-09-12T21:57:00.000-05:00</published><updated>2006-11-12T18:40:05.549-05:00</updated><title type='text'>Setting Up CVS</title><content type='html'>&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;You can follow the steps below on Athena to create a cvs repository and import the skeleton to begin working on the project.  Lines beginning with # are comments. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;cd /mit/6.035/groups/leXX&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;mkdir cvsroot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#set your CVSROOT, should be added to your startup script&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#bash &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;export CVSROOT=/mit/6.035/groups/leXX/cvsroot&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# or csh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;setenv CVSROOT /mit/6.035/groups/leXX/cvsroot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#create the repository&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;cvs -d $CVSROOT init&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#import the skeleton&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;cd /mit/6.035/provided/skeleton&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#the option compilier is the parent directory for the project&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;#leXX is a vendor tag and start is a release tag &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;cvs import -m "Importing Skeleton" compiler leXX start&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Now you can run 'cvs checkout project' to check out the skeleton where you want to begin working.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;If you would like to work on non-athena computer that has linux and CVS, you can use remote CVS by setting the environment variable CVS_RSH to "ssh" and setting your CVSROOT to: &lt;/span&gt;&lt;br /&gt;&lt;pre  style="font-family:lucida grande;"&gt;&lt;span style="font-family:lucida grande;"&gt;:ext:username@ant.mit.edu:/mit/6.035/groups/leXX/cvsroot&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;Then you can run cvs checkout from your linux box.&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-115811695737206623?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/115811695737206623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=115811695737206623' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115811695737206623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115811695737206623'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/09/setting-up-cvs.html' title='Setting Up CVS'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-34311656.post-115811499127726078</id><published>2006-09-12T21:34:00.000-05:00</published><updated>2006-11-12T18:40:05.479-05:00</updated><title type='text'>Introduction</title><content type='html'>Welcome to the blog for MIT 6.035.  Here the I will post answers to questions that I receive. Students can also post comments, corrections, and updates via the comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/34311656-115811499127726078?l=mit-6035.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mit-6035.blogspot.com/feeds/115811499127726078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=34311656&amp;postID=115811499127726078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115811499127726078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/34311656/posts/default/115811499127726078'/><link rel='alternate' type='text/html' href='http://mit-6035.blogspot.com/2006/09/introduction.html' title='Introduction'/><author><name>Mike</name><uri>http://www.blogger.com/profile/02736352114271454088</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
