CSE307 Home Page (Fall 2008)
Welcome to the CSE307 (Principles of Programming Languages)
home page for Fall 2008.
This page will be the main source of course information throughout
the semester.
Important Course News and Messages
Please check this page regularly for new messages.
The newest messages will always appear first.
- Solution for HW2:
- Here is my solution to the
HW2 rendering problem. In looking over what people submitted,
I get the impression that everybody has forgotten good coding
practices, such as avoiding excessively complicated expressions
and repetition of code. Just because you are programming in
an unfamiliar language doesn't mean you should make things
even worse for yourself by throwing good practices out the
window!
- Study questions:
- In class some of you asked for a practice exam.
I usually don't supply these, because (1) I don't believe in
the value of studying to a particular set of questions, and
(2) I don't usually have a large set of ready-made questions
and I don't want to make up two exams. However, what I did
was to take the ML questions I used on last semester's exams
and put them here.
Note that ML will not be the only topic covered on the exam,
since the lectures and readings covered other topics as well.
- Emailing me:
- I have had reports of email to me getting bounced by my spam filters.
I apologize for this, but I can't turn off my spam filters or else
I will receive over seven hundred messages daily that are
currently being blocked. The best I can do is to give some advice
about getting mail to me:
- Don't mail me from a gmail account. Too much spam comes
from gmail, and that characteristic alone raises the
mail almost to the threshhold of my filters.
Mail me from an on-campus email account.
- Don't send me HTML mail. Find the option in Outlook
that allows you to select for each user in your contacts
whether they should get HTML mail and turn that off
for me. Besides being a characteristic of spam mail,
I want to read plain text mail, not HTML mail, and getting
a second copy of your message, except three or four times
the size because of all the formatting code is a waste
of network bandwith and disk storage.
- Be sure to put a descriptive Subject line in your email,
and make sure that it has a return address that contains
your name.
- SML Code Examples:
- Some people asked in class about examples of "real" SML code.
I put online two pieces of code that I wrote.
- Here lies the file
poly.sml,
which implements arithmetic with sparse polynomials.
It is pretty much written in a pure functional style.
This was part of a much larger piece of software,
which made heavy use of the SML modules facility.
I have included all of the signature and functor
definitions necessary to compile functor Poly.
I verified that it can be compiled by "use"ing the
files in the proper order.
-
ccheck.sml
is an SML program that plays the game of Chinese Checkers
via a command-line interface. I wrote it (don't ask me why)
quite a long time ago, and it makes pretty substantial
use of imperative features (primarily arrays, which are
mutable).
I hacked the code so that it would compile and run
under a modern SML-NJ. To run it, first "use" the
file ccheck.sml. This will define
a function play and constructors
X and O of type player.
Start the game by typing play X; (white)
or play O; (black).
Moves are entered as sequences of points separated by
hyphens. For example: B2-D2 is a legal
first move for White, and this can be followed
(after the program makes Black's first move)
by A3-C3-E1. The objective is to "jump"
your marbles as quickly as possible down the board and
fill up all the opponent's starting positions before
he does it to you.
- Personalized Course Information Area:
- If you are taking the course, please visit the
Personalized Course Information Area,
register a user ID there, and fill out the
Academic Dishonesty Form.
I will be using this system to manage assignment
handin and distribute grades.
- Course sign-up questionnaire
(please fill out and return to Prof. Stark).
- Homework assignments:
Eugene W. Stark