Google Группы больше не поддерживают новые публикации и подписки в сети Usenet. Опубликованный ранее контент останется доступен.

Online compiler courses?

2 540 просмотров
Перейти к первому непрочитанному сообщению

Steve H

не прочитано,
30 авг. 2009 г., 02:03:5730.08.2009
Hi everyone,

I'm a CS major whose school unfortunately doesn't offer a dedicated
compiler course. I have taken a course in theory of computing and
know about DFAs, CFGs and all the requisite background material.

I've been searching for a university course that has most of the
material online, including lectures and assignments. So far I haven't
found one that's ideal.

I've looked at MIT's OCW, Stanford's compiler class, and those offered
at a few other universities. They're all pretty good but none of them
quite fits the bill. They each have lecture notes online, but some of
them are powerpoint overviews, which are difficult to get the real
gist from in a technical field like this, if you know what I mean.

My ideal would be a class that has lecture videos online, pdf course
notes (or powerpoint slides that go into more depth than is typical)
and has lab assignments in Java (using JCup and JLex, perhaps?)
Nothing at all against C, it's just that I use Java and C# almost
exclusively these days.

As to the labs and projects, the true ideal would be a setup where I
could download all the needed files and programs to my laptop and run
them locally; a number of the classes I've looked at require the
students to login to server X at the respective university, where the
needed build environment and software has been already installed.

I don't know if a class that matches this bill of particulars exists,
but if you know of one, or something that's close and does a good job
explaining the subject, I'd be grateful for the information. Thanks
very much.

andy johnson

не прочитано,
30 авг. 2009 г., 16:11:0230.08.2009
Montana State has a very well designed introductory compiler course
and the entirety of the course materials are available online. Lecture
videos are not available, but I feel that the content would still be
very accessible from the internet only. The labs are all based in Java
and don't require anything more than a text editor and javac.
Everything in the labwork you will build from scratch, which is really
the only way to go for a serious compiler course; if you can't build
your own scanner or parser by the end of a compiler course then it
probably isn't worth your time.

In comparison to the open courseware available from Stanford or MIT, I
think this track is much more accessible from a student's point of
view. In regards to copyright there is no stated policy, so I would
treat the materials as read-only. If you want to reference something
in the course I would be happy to go ask on your behalf.

http://www.cs.montana.edu/courses/450/

Louis Krupp

не прочитано,
30 авг. 2009 г., 17:12:4030.08.2009
Steve H wrote:
> I'm a CS major whose school unfortunately doesn't offer a dedicated
> compiler course. I have taken a course in theory of computing and
> know about DFAs, CFGs and all the requisite background material.
>
> I've been searching for a university course that has most of the
> material online, including lectures and assignments. So far I haven't
> found one that's ideal. ...

If you've been at this long enough to know all about DFAs, CFGs and so
on, then you're ready to do what people who wanted to learn something
did before they even had the option of going online: Get a book. Or
two. I'm sure people here can recommend some recent ones. (If you
want relics, let me know. I've got a few. They don't all show you
how to solve the problem in C, either, since some of them were written
before C was invented.)

Louis
[I agree. If you know the theory, you already know the more obscure
half of what a compiler course would normally teach. -John]

Matthias-Christian Ott

не прочитано,
30 авг. 2009 г., 16:26:4630.08.2009
On Sat, Aug 29, 2009 at 11:03:57PM -0700, Steve H wrote:
> Hi everyone,

Hi Steve,


> I've been searching for a university course that has most of the
> material online, including lectures and assignments. So far I haven't
> found one that's ideal.

There's none. Try self-studying with a book.

The TU Muenchen has all their lectures on Compiler Construction of
the last years online [1], but only in German, Saarland University
provides a course with the title "Abstract Machines for Compilers"
[2], Virtual University also offers an online course [3], but in
a non-English language, the UW also hosts a lecture recordings [4]
and MIT OCW includes "Computer Language Engineering" [5] with some
videos. See also [6].

Regards,
Matthias-Christian

[1] http://ttt.in.tum.de/lectures/index.php
[2] http://teleteaching.uni-trier.de/recordings/compiler.html#SS02
[3] http://www.youtube.com/watch?v=nVsUbG65TWY
[4] http://www.cs.washington.edu/education/courses/582/02au/lectures/index.html
[5] http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-035Fall-2005/CourseHome/
[6] http://stackoverflow.com/questions/424796/are-there-any-compiler-lectures-available-via-video

Steve H

не прочитано,
31 авг. 2009 г., 00:22:1731.08.2009
> If you've been at this long enough to know all about DFAs, CFGs and so
> on, then you're ready to do what people who wanted to learn something
> did before they even had the option of going online: Get a book.

Hi Louis,

I've also been going through books at the library, trying to find a
good compiler text. It's frustrating. The dragon book is considered
the canonical work, but it's quite meaty and difficult for self
study. I believe that's the general consensus.

As to other texts, I'm looking at Andrew Appel's book, and it's ok,
but I think this kind of course is best suited for classroom sessions
instead of self study, with lots of assignments to help the pedagogy.
Just my opinion of course but writing a compiler I think takes a lot
of hands on work, like engine building-- something that's best done by
doing instead of reading through a Chilton or Haynes manual.

It also doesn't help that a number of compiler texts are over ten
years old and focus on C development instead of java. Again, I have
nothing but respect for the C programming language but I'm more
experienced with Java and would prefer to use that if at all possible.

Torben Ægidius Mogensen

не прочитано,
31 авг. 2009 г., 04:52:0931.08.2009
Steve H <jkj...@gmail.com> writes:
> I've been searching for a university course that has most of the
> material online, including lectures and assignments. So far I haven't
> found one that's ideal.

The compilers course at the University of Copenhagen use a book that is
available online for free (see
http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/index.html). The
course homepage for this year is not up yet (it will be in a couple of
months) and will have slides for most of the lectures online. The
slides will, however, be in Danish, so probably not that interesting to
you. The project work is also specified in Danish, and it uses Standard
ML as implementation language, so it doesn't quite fit your Java
preference.

Torben

Paul Biggar

не прочитано,
31 авг. 2009 г., 05:29:2131.08.2009
On Sun, Aug 30, 2009 at 7:03 AM, Steve H <jkj...@gmail.com> wrote:
> I've been searching for a university course that has most of the
> material online, including lectures and assignments. So far I haven't
> found one that's ideal.

> My ideal would be a class that has lecture videos online, pdf course


> notes (or powerpoint slides that go into more depth than is typical)
> and has lab assignments in Java (using JCup and JLex, perhaps?)
> Nothing at all against C, it's just that I use Java and C# almost
> exclusively these days.


Hi Steve,

Mike O'Boyle's lectures from the University of Edinburgh are online:

Videos: http://groups.inf.ed.ac.uk/vision/VIDEO/CO/
Course page: http://www.inf.ed.ac.uk/teaching/courses/copt/

I've not done the course, and only taken a glance at the lectures, but
it seems the coursework uses JikesRVM, which I guess means Java. (That
said, avoiding C is probably counter-productive when working with
compilers).


Paul

--
Paul Biggar
paul....@gmail.com

Inderaj Bains

не прочитано,
31 авг. 2009 г., 14:05:3631.08.2009
In general, youtube education channel is a fabulous resource

www.youtube.com
click "Channels" -> Click "Education" ->Click "see more" on bar
Then you will get a search bar that searches education channel alone
This is difficult to find

Search compilers and you will get videotaped lectures on MIT's compiler course

And you can find many many courses there

Hope this helps :)

-Inderaj

Paul Biggar

не прочитано,
31 авг. 2009 г., 15:27:4831.08.2009
Hi Steve,

On Mon, Aug 31, 2009 at 5:22 AM, Steve H<jkj...@gmail.com> wrote:
>> Get a book.


>
> I've also been going through books at the library, trying to find a

> good compiler text. B It's frustrating. B The dragon book is considered


> the canonical work, but it's quite meaty and difficult for self

> study. B I believe that's the general consensus.

I really don't understand why the Dragon Book is considered canonical
for anything but parsing. Perhaps it's simply the incumbent. Anyhow,
I've found "Engineering a Compiler" by Cooper/Torczon to be excellent.
I don't think there are exercises in the book, but I believe its used
by many universities, so you may be able to supplement it with some
lab assignments online.

Best of luck,

Bruce C. Baker

не прочитано,
31 авг. 2009 г., 17:06:0931.08.2009
"Steve H" <jkj...@gmail.com> wrote in message

The most useful compiler book I've encountered is the original 1993
edition of David A Watt's "Programming Language Processors: Compilers
and Interpreters", ISBN 013720129X. It's almost 20 years old and uses
an ancient Pascal compiler as its implementation language, but it does
a great job of explaining the nuts and bolts of a working processor.

If you absolutely, positively MUST program in Java, there's a more
recent edition (which I haven't seen), ISBN 0130257869.

Both books are available from Amazon.

Stephen Horne

не прочитано,
31 авг. 2009 г., 21:37:3431.08.2009
On Sun, 30 Aug 2009 21:22:17 -0700 (PDT), Steve H <jkj...@gmail.com>
wrote:

>As to other texts, I'm looking at Andrew Appel's book, and it's ok,
>but I think this kind of course is best suited for classroom sessions
>instead of self study, with lots of assignments to help the pedagogy.
>Just my opinion of course but writing a compiler I think takes a lot
>of hands on work, like engine building-- something that's best done by
>doing instead of reading through a Chilton or Haynes manual.

Many DIY mechanics learned there stuff from Haynes manual. Sure, they
did the work, referring to the manual - but that's not the same as
having a teacher talk at you and scribble on a black/whiteboard while
you sit there in a zombie-like state ;-)

Seriously though, there's a lot of good video lectures out there, and
I'm currently reviewing and improving my linear algebra using MIT
course videos, but compiler stuff seems neglected.

Sadly, even automata theory is hard to find - theres a substantial
automata theory course on youtube...

http://www.youtube.com/view_play_list?p=7FC3A3D5750EC272

But unfortunately, it's in an Asian language - sounds a bit like
Hindi, but I can just barely count to three in Hindi, so don't trust
that guess. I've found a few short videos other than that, but not
much.

For books, my recommendation is "Modern Compiler Design"...

http://www.cs.vu.nl/~dick/MCD.html

I think a second edition is due soon, too. But - there's no Java. Oh -
and I didn't really get even LR parsing until I had read the free
download of "Parsing Techniques - A Practical Guide" too, but I think
that was just me being a bit dim.

http://www.cs.vu.nl/~dick/PTAPG.html

MCD isn't strong on automata theory (I don't recall any
non-deterministic automata or epsilon transitions, for instance) but
is more focused on building working compilers. The introduction,
scanning and parsing is less than 200 pages. Attribute evaluation gets
another 80 pages or so. The rest (about 420 more pages, not including
appendices etc) is on processing intermediate code, memory management,
and a chapter each on handling imperative/object oriented, functional,
logic and parallel/distributed languages.

K K

не прочитано,
2 сент. 2009 г., 04:12:0702.09.2009
Hello,

> Steve H <jkj...@gmail.com> (Compilers Central)

> it also doesn't help that a number of compiler texts are over ten years old and focus on C


> development instead of java. Again, I have nothing but respect for the C programming language but
> I'm more experienced with Java and would prefer to use that if at all possible.

The following books deals with Java and compilers.

_ Modern Compiler Implementation in Java, Second Edition by Andrew W. Appel and Jens Palsberg
ISBN:052182060x Cambridge University Press 2002 _


Regards,

Karoly

Hans Aberg

не прочитано,
2 сент. 2009 г., 08:37:1202.09.2009
Stephen Horne wrote:
> Sadly, even automata theory is hard to find - theres a substantial
> automata theory course on youtube...
>
> http://www.youtube.com/view_play_list?p=7FC3A3D5750EC272
>
> But unfortunately, it's in an Asian language - sounds a bit like
> Hindi, but I can just barely count to three in Hindi, so don't trust
> that guess. I've found a few short videos other than that, but not
> much.


One can find some by searching the iTunes store for "compiler" and
"compilers":
http://deimos3.apple.com/WebObjects/Core.woa/Browse/mit.edu.1300269432.01300269436
http://deimos3.apple.com/WebObjects/Core.woa/Browse/mit.edu.2210868377.02210868382
http://deimos3.apple.com/WebObjects/Core.woa/Browse/hpi-de-public.2195194054.02195194056

The last one, which is in European language - sounds a bit like German
:-) - also leads to the links
http://www.tele-task.de/series/list/592/
http://www.tele-task.de/series/archived/
where the stuff seems available without the above mentioned store. Some
stuff is even available in English.

Hans

Philip Herron

не прочитано,
2 сент. 2009 г., 18:23:1402.09.2009

Hey Steve

Here is my $0.02, a book I like and helped me a lot is "Compilers
Principles, Techniques and Tools" (
http://www.amazon.co.uk/Compilers-Principles-Techniques-Alfred-Aho/dp/0321491696
), though in my opinion it spends too much time on Lexical analysis and
parsing but its very good at it, where as different styles of IR, RTL
and code generation are my main interest though it does talk about this
in good detail.

In my opinion a university won't teach you to build a compiler for 'a'
language, at most you will do a very small part of a compiler probably
parsing, but you won't get the whole picture. I have built my own
interpreter for a language i designed (still working on it) and a very
basic c-compiler ( that breaks very easy ;) - just supporting very
limited subset of C ), just doing it as i saw fit. I am meant to still
be a student but i left university to do a years placement at a company
against my degree path, not sure whether i will go back because my
university lacks a lot of technical details that interest me.

So in my opinion if your serious i would just start implementing 'a'
language the way you think and learn from your mistakes ( I made tonnes
and still do ;) )and read as you go. If your going to start, just
remember your reading a plain text file of 'a' language and outputting
target code. The in between is the 'compiler', but if you go at it from
first principles and read and learn as you go you _will_ learn how to
build a compiler.

If your building a compiler i wouldn't worry about the language too much
i prefer C because its my favorite language, but the
algorithms/heuristics should be transferable to other languages too. And
since generally, a basic compiler will be run once, on a single source
file and then output the target code you don't need to worry about speed
(yes, you still want a fast compiler but Java should be fine for this).

But in my opinion too many universities only teach Java these days and
students never learn how systems work fully and good programming
practices or even how build systems work.

--Phil
http://redbrain.co.uk
[Um, the book you mention IS the dragon book, the new edition. -John]

kamal

не прочитано,
7 сент. 2009 г., 10:24:1107.09.2009
On Sep 1, 12:27 am, Paul Biggar <paul.big...@gmail.com> wrote:
> Hi Steve,
>
> On Mon, Aug 31, 2009 at 5:22 AM, Steve H<jkj2...@gmail.com> wrote:
> >> Get a book.
>
> > I've also been going through books at the library, trying to find a
> > good compiler text. B It's frustrating. B The dragon book is considered
> > the canonical work, but it's quite meaty and difficult for self
> > study. B I believe that's the general consensus.

I read that book end-to-end but an earlier edition than the current
one. Its mostly a book that lays out the principles and algorithms -
which are easy to specify for the front-end (as in DFA/LL1/LR1/LALR1)
but difficult to state for the backend. It doesn;t state the
implementation -but only states the principle which can be used in an
implementation.

> I really don't understand why the Dragon Book is considered canonical
> for anything but parsing. Perhaps it's simply the incumbent. Anyhow,

It does explain some other things like I/M code optimization, 3
address form etc.. When I attended a post-grade course on compilers
(which essentially focuses on the back-end), the reading material was
mostly research papers. That is evidence that this book is indeed the
incumbent and we are left without a better choise:-).

Maybe the OP should read up GCC's online documentation and go through
its sources. That will give practical information for free.

regards
-kamal

0 новых сообщений