COSC337 Programming Languages

Last modified: "May 3, 2000 03:28:19 by evett"

Instructor: Matthew Evett

MWF, 11:00-11:50
Room: PH 302.


Textbook: Sebesta, Concepts of Programming Languages (4th edition), Addison-Wesley, 1999 (required).
        Graham, ANSI Common Lisp, Prentice Hall 1996 (recommended).
Look for the symbols below!

Course Syllabus


Final Grades for Winter 2000


Lecture Notes

  1. Chapter 1 of textbook
  2. Chapter 3, Syntax and Semantics
  3. Lisp notes: basics, predicates, conditionals, logical operators

  4. Lisp notes: variables, recursion, iteration

  5. Lisp notes: mapping functions, structures, lambda, closures, I/O

  6. Lisp notes: fancy DEFUN, EVAL, macros

  7. The file "junk.cl", containing the stuff I've typed during class.
  8. Chapter 4, Identifiers
  9. Chapter 5, Data Types

Assignments

To submit assignments, go to the homework submission page.
  1. First Lisp assignment (Foo and Bar), due Wednesday, 2/9/00
  2. Second Lisp assignment (The Bank)
  3. Third Lisp assignment
  4. 2nd Java assignment

Notes on assignments, in general

See the page on Stylistic Requirements for programming assignments, here. Programming and other assignments should be completed by each student on their own. It is expressly forbidden for students to collaborate on assignments without the express permission of the instructor. A few friendly pointers and a bit of advice is fine, but "borrowing" or copying another's work is grounds for punitive action, including a failing grade and possible expulsion from the University.

See this page for pointers to various C++ programming reference guides.

Grading of programming assignments

As specified in the course syllabus, program functional correctness accounts for only about 70% of the grade assigned to a program. The remainder of the grade accounts for the program's style (including header and in-line comments, indentation, identifier names) and design (how you decompose the solution, what classes you use, etc.) A fuller description of stylistic and design requirements is here.

Web caucus for group discussion of issues

See the conference "cosc337f99". Feel free to make use of the web caucus for this class to discuss problems you are having with the programming assignments, etc. A "web caucus" uses Web pages to organize comments and discussion on this course and the lab. This is a lot like news except that your contributions to the forum will last longer than your "posted" messages to news groups, which expire every few days. To access the forum for this class, follow this link.

Programming Environment

Lisp Documentation

There is full documentation of Lisp on the web. This is a lot more than you'll need for this course, but you may find it useful:

CLtL2: Common Lisp, the Language, 2nd edition, by Guy Steele.

Obtaining Lisp

If you are interested in obtaining a version of Lisp to run on your home computer, for PC users, Franz's Allegro CL would seem to be a good bet. The freeware version of the program is limited, but should suffice for our class. If you've got the dollars, you can upgrade to a full implementation. A similar commercial product is Harlequin's FreeLisp. For other free implementations of Common Lisp, I suggest you look over section of the Common Lisp FAQ pertaining to free implementations of Common Lisp.

For Macintosh users, the best shareware version of Lisp is PowerLisp. If you can afford the $135, I heartily recommend Digitool's Macintosh Common Lisp. It is the best implementation of Lisp I have seen anywhere, bar none. Digitool also provides a free 2-week demo version of MCL. The commercial releases of both Allegro CL and MCL are full application development environments: debuggers, compilers, GUI construction kits, etc.


Java

There are two ways to obtain Java, by downloading (or purchasing) Borland's JBuilder (I recommend this option). or by downloading Java's JDK directly. To get JBuilder (Foundation edition), go to their website.

Java from Sun

To obtain Java directly from Sun, go to Sun's site. You want to download SDK2, v1.2.2 onto your PC. (Another name for this is JDK1.2, v1.2.2.) If you are using a Mac, you may have to download an earlier release of the JDK. Follow the installation directions! (You will have to set your DOS PATH variable.)

With Java installed, you may want to download the SDK documentation, too.

After you've got that downloaded and installed, you may want to download TextPad, a simple Windows code editor. You can get the download as shareware. Once TextPad is downloaded and installed, go ahead and run it. Go to Configure:Preferences. Select Tools from the resulting window. Then, click on the pull-down menu named "Add", to add the JDK Tool options. These should include "compiling java", "run Java Application", and "run Java Applet". You should now see those options under the Tools menu.

Java Documentation

Your download of Java should come with documentation. (This documentation is not "Javadoc", which is an actual tool.) If you want, you can see an on-line version of this documentation.

Run some code!

Okay, now let's look at some code. Download the code examples from Horstman and Cornell's book, Core Java. This is a zip file, which you should decompress. Now, cd into v1ch2/Welcome, and use TextPad to open Welcome.java. From within TextPad, use Tools:Compile Java to compile the file (forming Welcome.class), then run it using Tools:Run Java Application.

Core Java source code

Java References and Help

You might want to try this collection of FAQ's and other documentation.