|compilers, in a nutshell email@example.com (1994-05-09)|
|Re: compilers, in a nutshell chase@Think.COM (1994-05-09)|
|Re: compilers, in a nutshell firstname.lastname@example.org (1994-05-10)|
|Re: compilers, in a nutshell email@example.com (1994-05-11)|
|Re: compilers, in a nutshell firstname.lastname@example.org (1994-05-12)|
|From:||email@example.com (Bill Leonard)|
|Organization:||Harris Computer Systems, Ft. Lauderdale FL|
|Date:||Wed, 11 May 1994 21:27:43 GMT|
firstname.lastname@example.org (Dan Ellard) writes:
> If you had a six hours of lecture time to discuss compilers, what would
> you cover? ... My current outline (which is very rough) looks like:
> Lecture 1
> 1. What is a compiler?
> 2. Lexical analysis
> 3. Parsing
> Recursive descent
> Predictive parsing.
For a short overview, I'd leave out many details about lexical analysis
and parsing, and just describe what parsing does and that there are many
tools to help with this portion of building a compiler.
If you insist on including details, then I'd leave out CKY (hardly used in
commercial compilers) and predictive, and include LL(1) and LALR(1).
(Maybe I misunderstood what you meant by predictive parsing?)
A comment: Even many computer science students, who just take an
introductory course on compilers, come away thinking that lexical analysis
and parsing is all there is to a compiler. If you can, try to avoid
giving that impression.
> Lecture 2
> 1. Intermediate representations.
> 2. Type checking / inference.
If you say more than 2 sentences about type inference, you will probably
lose your audience or be forced to spend the entire 6 hours on it.
What about semantic analysis? There's more to that than just type
checking. Perhaps a word or two about overload resolution, in the sense
that almost every programming language overloads some things (like + on
both integers and floats). This fits with an earlier poster's comment
about including some concepts of programming languages, I think.
> Lecture 3
> 1. Code generation.
Are you including register allocation here? If not, where? At least
mention that this is one of the most important and hardest tasks a good
commercial compiler must perform.
> Lecture 4
> 1. Optimizations.
i. alias resolution and analysis
ii. loop optimization
iii. common subexpression elimination
iv. constant propagation and folding
i. branch optimizations (e.g., chaining)
ii. instruction scheduling
iii. elimination of redundant instructions (cleanup of code
Hope this helps.
Harris Computer Systems Division
2101 W. Cypress Creek Road
Fort Lauderdale, FL 33309
Return to the
Search the comp.compilers archives again.