This is a course in comparative programming languages. We do not stress learning individual languages, but instead the fundamental concepts important to the field. We will study the major programming language paradigms: imperative, logic and functional. Among the other topics discussed are syntax, semantics, types and objects, exception handling, and modules.
The textbook for this class is:
Robert W. Sebesta Concepts of Programming Languages, 4th ed. Reading, Masachusetts: Addison-Wesley, 1999.We will not follow the book closely, and we will take some of the material in a different order. We will not have time to cover every topic in the book in class, but you will be held responsible for knowing everything in the book. (Graduate students taking the comprehensive exam are required to know everything in the book for the exam.) The book has plenty of good material, you should read all of it. Buy the book, start reading it now! To prepare for class re-read the appropriate chapters as we come to those topics during the course of the semester. Many homework exercises will come from the textbook.
In class we will use examples from the Ada programming language, if you wish to aquaint yourself with the language, I recommend Chapter 1 of Norm Cohen's book Ada as a Second Language. One project will be written in Modula-3; its definition is a mere 50 pages. Another project will be written in SML; a concise introduction can be found in "Tips for Computer Scientists on Standard ML" (local PostScript Copy) by Mads Tofte. Information about polymorphism can be found in the excellent paper On Understanding Types (local PostScript copy) by Cardelli and Wegner. An example proof in Hoare logic is available on the WWW. The Pascal examples using function parameters show the syntax of the original Pascal and modern versions.
To view PostScript files you may have to configure your browser to invoke the program /software/X11R6.3/bin/ghostview for the MIME type application/postscript.
P(a). Q(x) :- not (P(b)).not is defined operationally in Prolog as:
not(C) :- call(C),!,fail. not(C).
The query P(b)? does not succeed, so the query Q(b)? does succeed (x is bound to nothing!). In Prolog we conclude Q(b) is true; but is it?
Logically we have P(a) & forall x ¬P(b) => Q(x) which does not imply Q(b). The absence of the assertion P(b) does not imply (logically) ¬P(b).
There will be an in-class midterm and a final exam. In addition, we anticipate that there will be about three homework assignments and three projects. No late work is accepted. These homework assignments are important. We encourage you to work together, as long as you individually understand, and write up the solutions. Please take the effort to do a good job; partial credit will be awarded sparingly. Remember a problem is not correct until it is written up well enough to convince a three-toed sloth that it is the correct answer.
A midterm and a final exam will be given. The grade for the course will be based 60 percent on the exams, 40 percent on the assignments and projects. If you use some source in solving the homework or the projects, you must cite it. Anyone representing someone else's work as their own, will receive an F for the class.
For each student the numeric scores for the assignments and exams are recorded. If you have any question about your standing in the class, or if some score has been recorded wrong, please contact me. Please keep in mind the CS honor code.
Please note, that copies of some work (homework, projects, exams, etc) for undergraduate classes may be kept on file for review by the CSAB, for the purposes of maintaining the accreditation of the CS program.
There will be three small projects in this course. The first project is to create a WWW page with information about some programming language and to write a Java applet. The second project will be written in Modula-3 and concerns linked lists. Since Modula-3 is much like Ada and Pascal, programming in Modula-3 should pose no special problem. The third project will be to write a tautology checker in ML. This project will be implemented in a functional style, i.e., without using the assignment statement. You may work together on the programming assignments in groups of no more than two people. Please do not work with the same person twice.
These projects will require that all students have an Harris Lab account.
Tuesday, January 12, 1999 | first lecture |
Tuesday, January 19, 1999 | RE, BNF[POPL] |
Thursday, January 21, 1999 | Modula-3 [POPL] |
Thursday, January 28, 1999 | HW #1 |
Friday, February 5, 1999 | WWW project |
1999 | HW #2 |
Thursday, February 25, 1999 | midterm exam |
Friday, March 5, 1999 | last day to withdraw |
March 8-12, 1999 | Spring break (no classes) |
Friday, March 19, 1999 | M3 project (Part I) |
Friday, March 26, 1999 | M3 project (Part II) |
1999 | HW #4 |
Thursday, April 29, 1999 | last lecture |
Friday, April 30, 1999 | SML project |
Tuesday, May 4, 1999 | final exam (6:00pm-8:00pm) |