CSCE 330 (Fall 2014): Lecture Log

August 21 (Thu), 2014 HW1 assigned: Do the exercise at the end of Chapter 1 [L], due 2013-08-28 (Thursday; early work will be accepted). Turn in a paper. Try to keep your work on a single page. Syllabus, grading policy handouts (also on the web site). Textbooks. Why study principles of PLs? The three major language families. Euclid's algorithm in C, Scheme, and Prolog. Brief history of programming language (based on an article by Brian Hayes, linked to the web site for the course).

August 26 (Tue), 2014 Q1. Ch.1 [L] ("Thinking and Computation"). Beginning of Ch.2 [L] ("A Procedure for Thinking"), through Section 2.3[L] (slide 11).

August 28 (Thu), 2014 HW1 collected. Ch.2 [L] ("A Procedure for Thinking"). Beginning of Ch.3 [L] ("The Prolog Language") through Section 3.2.1. The instructor installs the latest version of SWI-Prolog for Windows (32-bit; 6.6.6) on his laptop, shows that an earlier version (which is adequate for the course) is installed on the departmental Linux machines, and runs some simple examples related to the family KB (figure 3.2).

September 2 (Tue), 2014 PR1 assigned: exercises at the end of ch.3[L}, due on Tuesday, September 9. HW1 returned. Ch.3 [L] ("The Prolog Language") through section 3.2.5. The SWI-Prolog website (review). How to install SWI-Prolog (review). Examples of Prolog program execution. Use of the trace facility. Negation as failure. Negation as failure with variables. Note: One can create a log of an SWI-Prolog session using protocol/1 and noprotocol/0. See www.swi-prolog.org/FAQ/MakeLog.html. Also try apropos(log) at the prolog prompt for additional related predicates.

September 4 (Thu), 2014 Ch.3 [L] ("The Prolog Language") completed. Ch.4 [L] ("Writing Prolog Programs") through section 4.2.

September 9 (Tue), 2014 PR1 for section 001 is due on Thursday, for the reason explained below. Section 001 was canceled due to fire alarm and shut down. Some students remained for a 20-minute class meeting in which we covered the end of Ch.4[L]. This material will also be covered on Thursday.

September 11 (Thu), 2014 PR2 assigned: exercises at the end of ch.4[L], due 2014-09-18; four generations are sufficient. PR1 collected. Ch.4 [L] ("Writing Prolog Programs") completed. Ch.5 [L] ("Case Study: Satisfying Constraints") through section 5.1; subsection 5.2.1 ("The anonymous variable in Prolog") completed.

September 16 (Tue), 2014 Q2. Ch.5 [L] ("Case Study: Satisfying Constraints") through 5.3.2 ("Cryptarithmetic as constraint satisfaction").

September 18 (Thu), 2014 PR3 (HW4) assigned: exercises 2,3,and 4 at the end of Ch.5[L], due on Thursday, September 25, 2014; you do not need to explain the choice of ordering of constraints in exercise 3. PR2 (HW3) collected. Ch.5 [L] ("Case Study: Satisfying Constraints") completed.

September 23 (Tue), 2014 PR4 (HW5) assigned: exercise 6 at the end of ch.7[L], due on Tuesday, September 30, 2014. On an exceptional basis, no more than half credit will be give for homework returned after the start of class on September 30. This is to insure that we can discuss the assignment on September 30, as part of the midterm review. PR1 and PR2 returned. Discussion of PR2. Chapter 6 [L] ("Case Study: Interpreting Visual Scenes"): sections 6.1 and 6.2. (This is the only part of Ch.6 covered in this course.) Chapter 7 [L] ("Lists in Prolog") started: through section 7.1.

September 25 (Thu), 2014 PR3 collected. Chapter 7[L] ("Lists in Prolog") completed.

September 30 (Tue), 2014 PR3 returned. PR4 collected. PR3 and PR4 reviewed in class, in detail. Problems from 2012 and 2013 midterms reviewed. The problems are linked to the website. Some discussion. Midterm will be on Thursday, October 2, 2014. It will be closed book.

October 2 (Thu), 2014 MT1 (Midterm).

October 7 (Tue), 2014 MT1 and PR4 returned. Midterm discussion. Chapter 9 ("Case Study: Planning Courses of Action") througn 9.2.2 ("Solving the Three Coins Problem"). The students are encouraged to read through the end of section 9.2 ("Generating Plans").

October 9 (Thu), 2014 Class led by Mr. Heath Carroll. Backus's 1987 lecture on FP, based on his 1978 Turing award paper.

October 14 (Tue), 2014 Q3. Backus's 1987 lecture on FP, based on his 1978 Turing award paper, with many interruptions and discussion. Carter Bays's FP interpreter. Note that Java must be configured to accept http://www.cse.sc.edu/~bays/group9/index.html as an exception site.

October 16 (Thu), 2014 PR5 (HW6) assigned, due on Tuesday, October 28, 2014. Completion of Backus's 1987 lecture. Examples of short FP programs. Haskell compilers: Hugs and GHC(i). Ch.1 [H] (Introduction [to Haskell]), briefly.

October 21 (Tue), 2014 HW7 assigned: Exercises 1-5 at the end of Ch.1[H] and exercises 1-2 at the end of Ch.3[H], due October 30, 2014. For exercise 4 Ch.2[H], you must provide two definitions of last. You are welcome to try your answers using Hugs or GHCi, but you are not required to do so. PR6 (HW8) assigned: Exercises 3-5 Ch.2 [H], due October 30, 2014. This is a programming assignment. I expect evidence (in the form of a script) that you ran your code and examples of use. Ch.1 [H] (Introduction [to Haskell]), completed. Ch.2 [H] ("First Steps"), completed. Ch.3 [H] ("Types and Classes") started.

October 28 (Tue), 2014 PR5 (HW6, on FP) collected and discussed in class in detail. Ch.3 [H] ("Types and Classes") almost completed.

October 30 (Thu), 2014 PR7 (HW9) assigned: exercises 1,2,4,5 ch. 4 [H], due on Thursday, November 6. PR5 (HW6, on FP) returned: please see email sent from blackboard concerning possible resubmission for more credit. HW7 and PR6 (HW8) collected. The following two teams will do programming language presentations on November 6: Cameron, Litwin, McNear: Brainfuck (imperative language) and Abercrombie, Labrador, Rhodes: Mercury (logic language). Each presentation is expected to last about ten minutes. Ch.3 [H] ("Types and Classes") completed. Ch.4 [H] ("Defining Functions") through section 4.4.

November 6 (Thu), 2014 (Note: No classes were held on November 4, Election Day.) HW7 and PR6 (HW8) returned and discussed. PR7 (HW9) collected. Presentation by Cameron, Litwin, McNear: Brainfuck (imperative language); some problems with setup. Ch.4 [H] ("Defining Functions") completed. Ch.5 [H] ("List Comprehensions") through the beginning of section 5.2[H].

November 11 (Tue), 2014 PR8 (HW10) assigned: exercises 4.6, 5.3, 5.4, 5.7 [H] due on Tuesday, 11/18. Presentation by abercrombie, Labrador, and Rhodes on Mercury (logic language) and by Mauney, Papenhuyzen, and Warren on Lua (imperative language with some functional characteristics). PR7 (HW9) returned and discussed. Ch.5 [H] ("List Comprehensions") through most of section 5.3[H]. Students should be able to do PR8 (HW10) now, except for exercise 5.7[H].

November 13 (Thu), 2014 Further discussion of the recursive solution to halve (exercise 4.1[H]). There is now a dropbox for student presentations. Please submit your presentation there. Students are reminded to check the web site for team composition, language chosen, and expected date of presentation; please point out errors. Ch.5 [H] ("List Comprehensions") completed, including a detailed presentation of the Caesar cypher example. Ch.6 ("Recursive Functions") almost completed. Discussion of the take-skip mutual recursive program started.

November 18 (Tue), 2014 PR9 (HW11) assigned: exercises 4 and 5 Ch.6 [H], due Tuesday, November 25, 2014. PR8 (HW10) collected. Presentations by Abrams, Brooker, Melton (Erlang) and Carton, Praser, and Tong (Ruby). Scalar (inner) product (as described in exercise 5.7) in FP. Ch.6 ("Recursive Functions") completed. Discussion of the take-skip mutual recursive program completed. Ch.7 [H] ("Higher-order Functions") through the beginning of section 7.3.

November 20 (Thu), 2014 PR8 (HW10) returned. Presentations by Aaron, Jendrasiak, and Short (LOLCODE), Brewer, Kozma, and Reddig (Dart), and Breece, Dunlap, Jordan, and Sport (Neko). Some discussion of higher-order functions, with an incomplete example of scalar (inner) product using higher-order functions.

November 25 (Tue), 2014 Assignment: view video by Graham Hutton for Ch.11 [H]: "The Countdown Problem," before the next (Tuesday, December 2) class. A direct link is given on the course web site, in the "Reference Materials" section. Students are advised to download the video, rather than stream it. Quiz 4. PR9 (HW11) collected. Ch.7 [H] ("Higher-order functions") completed. No presentation, due to a technical glitch affecting the Perl team.

December 2 (Tue), 2014 PR9 (HW11) returned. Q4 discussed. Ch.8 ("Functional Parsers") done in full.

December 4 (Thu), 2014 Q5. Brief discussion of how Philip Wadler's report "Monads for Functional Programming," now linked to the course website, relates to Ch.8[H]. (Some comments on this are also included on the course website near the link to the paper.) Notes about the final exam: it will be closed book and notes; it will be comprehensive but will emphasize the material covered since the midterm; last years' exam, with answers, is now posted on the course website; the exam for section 1 will be on Wednesday, December 10, 2014, from 1230-1500 in the classrooms (SWGR 2A27). This is the regularly scheduled time for courses taught from 1450-1605 on Tuesdays and Thursdays. Presentation by Hood, Vu, and Wong on Perl. Presentation by Hamod and Ostrander on Python. Course evaluation. End of course.