Office Hours
Thursday: 9:00am-12:00pm, ESB 229A Desk 5,
or by appointment
Assignment
Submission
To submit your assignments, login to your CS
account and type the following command:
turnin --submit xugang
<project>
<filenames>
where <project> is "proj1" for the first assignment,
"proj2" for the second, and proj3, proj4, proj5, proj6. Notice we
use a flat numbering system. For example, to submit the Lex assignment, you would type:
turnin --submit xugang proj2 lexan.l lexan.h lexanl.c printtoken.c README makefile . . .
Please submit a complete set of files
necessary to compile your assignment, not just the ones that you modified. Also
turn in a README file containing instructions on how to compile your program,
your programming platform (Solaris or Linux), any parts of the assignment you
were unable to complete, and anything else you'd like to mention about your
program. You do not need to include test files such as graph1.pas or
scantst.pas with
your submission.
Tips
- Selection of programming languages:
In this course, students will be provided a frame work of a mini-Pascal
compiler. We have a C version and a Lisp version of the frame work. Most
students take C. But learning basic Lisp is still very helpful, as the
intermediate code of our compiler frame work takes the form of Lisp. For
those who want to use the language they feel comfortable such as Java, C++,
Haskell, please remember you will probably have to do everything from
scratch, and you need to manage your schedule carefully, as this is a
heavy-loaded programming course.
- Selection of platforms: Linux is
recommended in my personal opinion, as Linux and Linux-like environments are
easier to access. For those who use OS X or Windows system to do the
assignment, please be cautious about the compatibility issue. For Windows
users, I strongly recommend cygwin. See the section of "Reference Links"
- Compatibility issues: Compatibility
issues arise now and then in the previous semesters because of selections of
platform and compiler. It is all right to write the code using any IDE in
Mac or PC such as Code Warrior or Visual Studio, if you feel vim and Emacs But please use
gcc to
compile and gdb to debug. Failure to use them may bring the last-minute
trouble: students may find the code that works well in their home desktop or
laptop suddenly appears not compilable or runnable in UTCS Unix hosts, and
it takes time to fix these incompatible issues.
- Segmentation fault: Segmentation
fault is a frequent error in C program development. Most of the time it
arises from the misconduct of pointer such as trying to access array element
out of boundary and using a pointer that has not get memory allocation yet.
See the link of
Wikipedia for some quick examples.
Reference
Links