Held Monday, January 22, 2001
Summary
Today we begin the course with an overview of the compilation process
and a consideration of the structure of the course.
Assignments
- Fill out the introductory
survey.
- Log on to Blackboard,
select the CSC362 Web, and post a comment to the
Which Language forum.
- Read Chaper 1 of ASU.
Overview
- Background
- What is a compiler?
- Why study compilers?
- How to study compilers
- Administrative Issues
- What is a compiler? revisited
- I believe in beginning my courses with a short dialog concerning the
topic of study. In particular, I think we should ask ourselves:
- You can find some of my notes on these questions below. However,
this class will develop its own answers to these and related
questions.
- Compilers are programs that translate from one language (typically
a high-level language, like Java, C, or Pascal) to another
(typically a low-level language, like assembler, machine code,
JVM, or C).
- To do this translation, they step through a number of phases,
which we will discuss later (probably Friday).
- The joy of creating a significant computing artifact.
- CS is a field that involves both practice (e.g., programming)
and theory (e.g., CSC341). Compilers are a wonderful ``platform''
for studying both practice and theory. In fact, compilation
motivated many early theoretical problems.
- Many large programs include their own language. If you are ever
called upon to help design such a language, you can draw upon
these skills.
- Understanding how compilers work may help you program better
(although I strongly discourage you from ``coding for the compiler'',
particularly since newer compilation techniques may actually do worse with
programs designed for earlier compilers).
- Compilation involves many important subfields of computer science,
including
- Formal language theory
- Programming language design
- Software design
- Architecture
- Do problems to ensure that we understand the underlying theories.
- Read the code for someone else's compiler.
- Build one.
- There are many of accompanying documents which you can find
through the handouts page.
We will go over these casually.
- As an experiment, we'll be using Grinnell's Blackboard system for
some course stuff (e.g., discussion groups). Let me know if there
are groups you want me to add.
- Note that the department voted that CSC362 is intended to serve some
of the same purposes as CSC223. Because of this, CSC362 must involve
- at least one public presentation;
- group work; and
- a significant project.
- The significant project is no problem, as any compiler is a pretty
significant project. In fact, it is significant enough that you will
be working on it in groups.
- For public presentations in CSC362, I will ask you to choose a topic
that we have not covered in the course and give a short (20-minute)
presentation. You will have the opportunity to work in groups.
- In addition to group programming and presentation, you will also do
a number of written homeworks (often, simultaneous with the programming
work). You should do those homeworks as individuals, although you may
discuss ideas and answers with each other.
- I'd like to remind you that academic honesty is an important issue
at Grinnell. Please don't cheat. Please make sure to cite any code
you reuse or modify.
- As I may have mentioned earlier, a compiler does its translation
in phases, one phase at a time.
- There are a variety of ways to express these phases and different
compilers may choose different ways to break up the compilation
process.
- The simplest is the two-phase compiler. The first phase
(called the front end) translates from the original high-level
language to a simple common intermediate language. The second phase
(called the back end) translates the intermediate language
to assembler or machine code.
- The front end is language dependent. The back end is machine dependent.
- The computer science education community has some debate about what
the undergraduate compilers course should study.
- Why to emphasize the back end:
- Almost all current research involves the back end (e.g., optimizations).
- Much of the front end can be automated using long-standing tools.
- Why to emphasize the front end:
- Helps ground theory.
- Most programmers will implement small languages and won't want to spend
effort on the back end.
Sunday, 21 January 2001
Monday, 22 January 2001
- Updated top matter slightly.