Class 39: Wrapup
Held Friday, December 11, 1998
- I'm still working hard on the code files. Part of the problem is that
coding requires concentrated time, and the end of the semester brings
- Push me on the parts you think you'll need (I'll do my best to
respond to any particular requests received by 11:00am Saturday).
- I'll be in on Saturday, but don't really want interuptions.
- I've tried to include sufficiently many comments that if you need
to fill in or fix some of my code, you'll know what to do. (Hey,
you've learned to do it for Appel ...). If you do update my code,
please let me know and I'll try to incorporate the changes.
- Feel free to email me more general questions on Saturday. I'll be in
between about 11:00 and 2:00.
- I'll be out of town Sunday, Monday, and Tuesday. I should be in my
office most of the day Wednesday and Thursday.
- Our main focus today will be on the final, but we'll spend some
time discussing related issues.
- There was a typo in the final. I added T(201) and T(202). That should
have been T(200) and T(201).
- Be careful on the
JUMP instruction, which is an indexed
jump. Note that the indexing is 1-based. So, if you just want to jump
to label l, use
JUMP 1 l.
- I should be able to let you know grades on your presentations next
week (Mr. Walker and I need to confer on some strengths and
- Most of the presentations were relatively good.
- Some general strengths:
- Most of you coordinated the group well
- Most of you found good illustrative points
- All of you stuck to the time limit (which can be hard)
- Here are some general comments on weaknesses:
- Most of you tried to fit too much into too little time. In the
class, we often spent a full week or more on each chapter. Most
of you tried to fit a full chapter in twenty minutes.
- Many of you did little more than replicate what was in Appel
(with some exceptions). I would have liked to have seen more
- Many of your ``handouts'' are little more than copies of your slides.
The goal was to provide something that your colleagues could use as
a reference and learning tool.
- Few of you had thought about implications of what you were presenting,
which came out most clearly in the question-and-answer sessions.
- A few of you need to work on the ``put just the important points
on slides'' strategy. Your example slides were good, but there
weren't always enough summary slides.
- Just a reminder on what's supposed to happen with your compilers.
- You will convert Tiger programs to a
T_stmList (C), representing a
``straight line IRT program''.
- No nested operations.
- Limited nesting on memory references.
- As part of that conversion, you will be able to take advantage
IRT.Frame (Java) or
- Once your conversion is complete, you will use
irtprint (C) to convert your code to a form
that can be interpreted by the IRT interpreter. Note that the
commands take a
PrintWriter (Java) or
FILE (C), so that you can specify which file to
- You can then execute the code with
- I've also updated (or will update) some of Appel's components to
better support some aspects of the compiler.
Temp.Temp (Java) and
support named and prenumbered temporaries.
- New IRT nodes
support additional instructions. You will not need to use these,
but you need the files that define them.
- We've looked at a surprising number of topics this semester, which
is even more surprising in that we've worked to fit them all
- Some ``theoretical'' topics:
- What is a language?
- Relationship of syntax and semantics
- Regular expressions and grammars
- Conversion from RE to Optimal DFA
- Types and type systems
- Computational complexity (touched on)
- Many practical topics
- How to build a lexer/parser
- How to do things during parsing
- How to type check
- How to translate (in our case, from AST to IRT using rules
for each node and from IRT to assembly using patterns)
- And much much more
- Some implicit topics
- Managing a large project by segmenting into parts
- Working with someone else's code
- Working in a group
- Details of assembly code
- And some others
- That's a lot to cover in a semester, and I'm proud that most of
you made it through (or will by the end of next week)
- There are also a number of topics that I would have liked to have
covered that we did not have time to cover. Here are the two main
ones I would have liked to have covered.
- Garbage collection. There was a good short presentation
on this topic, but it would have been interesting for us to go into
more depth on the topic, trying some examples, perhaps coding up our
own garbage collectors, and even getting some statistics on how
- Optimizations. There was an interesting short presentation
on one particular optimization. However, there are many other simpler
optimizations that can be useful and understandable. For example,
if you find that a value is not live after it is defined, then you
don't need the statement that defines it.
- Created Wednesday, November 25, 1998, as a blank outline.
- Filled in the details on Friday, December 11, 1998.
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Fri Dec 11 10:43:02 1998.
This page generated on Fri Dec 11 10:45:05 1998 by SiteWeaver.
Contact our webmaster at firstname.lastname@example.org