From: | Gene <gene.ressler@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Wed, 10 Aug 2011 00:53:58 -0700 (PDT) |
Organization: | Compilers Central |
References: | 11-08-006 |
Keywords: | courses |
Posted-Date: | 10 Aug 2011 09:55:06 EDT |
On Aug 6, 1:28 pm, amit karmakar <amit.codenam...@gmail.com> wrote:
> I am an undergraduate in computer science. I have been reading about
> compilers recently. I wish to do a project as a part of my study
> course in a time span of 6 months. I am pretty much aware of the fact
> that projects on compilers require much time.
>
> I would like to have some suggestions as to what *new* and
> *innovative* project i can do which are based on compiler design.
> Also, considering the time i have to implement the compiler, i can
> think of cutting down work, like working on subset of a language. I
> would preferably not tend to work on only a specific part(phase) of
> compiler. It will be better if I implement a complete compiler for
> some architecture and see the executable running.
>
> Thanks in advance,
> Please bear with my bad english.
Your English is excellent. Thanks for taking the time to be clear.
Consider checking your own school and perhaps others near you to see
if there is a computer architecture course that requires students to
implement a processor in programmable logic. Many do these days. By
definition such processors are "new" because they're invented for
teaching purposes.
Either have your advisor or you yourself convince the professor in
charge of the architecture course or another student to take on the
project of running binaries produced by your compiler. Agree on a way
to load binaries in advance.
Then build a C subset compiler for that processor. Start with
integers, characters and associated pointers and arrays. You can add
records, etc. if there's time. (There probably won't be.) I
recommend using an existing complete C grammar and merely raise errors
for parts of C you don't implement. But you could also look at
textbooks that include C subset grammars. Louden is one I recall.
My students have done independent study projects along these lines.
They always learn a lot. There is tremendous pride when code your
compiler generated runs on a processor built by a colleague.
Perfection would be getting your compiler to compile itself and run on
the target, but that's probably more work than an undergrad should put
into one project.
If you can't find a suitable target, you might look at
http://www.eecs.usma.edu/download/Marasm13.zip and convince whoever
runs the architecture course to use this one. It already has an
assembler and emulator, which allow you to focus on compilation. If
you decide to do this, write me for the newest version.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.