COSC 3015

Fall 2005

TTH: 9:35-10:50

EN 2070

 

Instructor:

Dr. Jeffrey Van Baalen

Office:

Eng. 4083

Office hours:

To be announced and by appointment

Email:

mailto:jvb@uwyo.edu

Grader:

Divya Sethi

Office:

Eng. 4070

Office Hours:

T:12:45-1:45,W:1-2,Th:4:15-5:15

Email:

mailto:dsethi@uwyo.edu

 

 

Course Text: “Structure and Interpretation of Computer Programs,” Second Addition, Abelson & Sussman, MIT Press, ISBN 0-07-000484-6. A complete online version of this book is available here courtesy of MIT Press.

 

Software: In this course, we will program in Scheme, a dialect of LISP. The Scheme system is available on the Windows machines in the Upper Division Undergraduate Lab, Eng 4086. Even better you can download it onto your own Windows PC. Download and run the installer located here

 

Midterm: The midterm examination is Thursday Oct. 20. Here is a practice midterm. The midterm with answers is here.

Final:  The final examination is Tuesday Dec. 13, 10:15-12:15. Here is a practice final.


 

Course Outline

(subject to change)

 

1.     (1 lecture) General introduction. What is lisp? What is Scheme? Where to find Scheme. How to use Scheme.

2.     (2 lectures) The elements of programming, expressions, naming, evaluation, substitution model of procedure application, conditionals

3.     (6 lectures) procedures as abstractions, recursion, inductive sets

4.     (2 lectures) Procedural abstraction and higher order procedures

5.     (2 lectures) Data abstraction, arithmetic operations, interval arithmetic

6.     (1 lecture) Sequences, hierarchical structures

7.     (3 lectures) Symbolic data

8.     (1 lecture) Multiple data representations, tagged data

9.     (3 lectures) Data-directed programming, symbolic algebra

10. (7 lectures) Modularity, Objects, and State

 


Assignments

(will be listed here as given)

Download the trace package here.

 

1.     (due Sept. 6) To familiarize yourself with the DrScheme IDE, take the tour. Using Scheme, do exercises 1.1 and 1.3 (pages 20-21). Also do exercises 1.2, 1.4, and 1.5 by hand.

2.     (due Sept. 13) Do exercises 1.7, 1.8, 1.9, 1.11, 1.12, 1.14, 1.17, 1.20, 1.26

3.     (due Sept. 20) Do exercises 1.29, 1.30, 1.31, 1.32, 1.33, 1.40, 1.42

4.     (due Sept. 29) Do exercises 1.46, 2.1, 2.2, 2.4, 2.6, 2.10, 2.12, 2.17, 2.18

5.     (due Oct. 6) Do exercise 2.22, 2.24, 2.25, 2.26, and 2.33; Program exercises 2.21, 2.27, 2.30, 2.32, 2.34, and 2.35. Here are some answers to selected exercises.

6.     (due Oct. 13) Do exercises 2.37, 2.38, 2.54, 2.56, 2.60. Click here to get the code for the derive function.

7.     (due Nov. 3) Do exercises 2.77, 2.78, 2.79, 2.83, 2.87, and 3.1. Click here for the numbersys.scm file.

8.     (due Nov.10) Do exercises 3.8, 3.12, 3.14, 3.17, 3.18, and 3.22.

9.     (due Nov. 17) Do exercises 3.24, 3.27, 4.1, 4.2, and 4.4. Here is the code for the evaluator.

10. (due Dec. 1) Do exercises 4.7, 4.12, and 4.22. Here is the new code for the evaluator.

11. (optional, due at final) Do exercise 4.43. Here is the code for the amb evaluator. Write the CPS-style function loopK that takes three arguments: a function f also in CPS-style, a list ls, and a continuation K. loopK is the CPS-style version of the loop function that executes f on each of the elements of ls for side-effects. In other words, loopK calls its continuation with some meaningless value such as ‘ok. Here is the normal definition of loop:

  (define (loop f ls)

    (if (null? ls) ‘ok (begin (f (car ls)) (loop f (cdr ls)))))


 

Lectures

 

Lecture 1

Lecture 2

Lecture 3

Lecture 4

Lecture 5

Lecture 6

Lecture 7

Lecture 8

Lecture 9

Lecture 10

Lecture 11

Lecture 12

Lecture 13

Lecture 14

Lecture 15

Lecture 16

Lecture 17

Lecture 18

Lecture 19

Lecture 20

Lecture 21

Lecture 22

Lecture 22a

Lecture 23


Policies and Grading

 

Programming assignments are designed to be completed independently. If you receive outside help, either from lab assistants or from friends or classmates, you MUST report the names of everyone who helps you. If you do not know the name of a lab assistant, ASK.

 

Assignments are due by 5:00 pm on the due date. No late written assignments will be accepted. Late programming assignments will depreciate in value 5% week per day. Programs more than one week late will receive no credit. However, anyone who completes an assignment, even if it is too late for credit, may request a make-up assignment and the grade on the make-up will be substituted for the grade on the original assignment. If you never complete an assignment and you request and complete a make-up, it will be worth half the value of the original assignment. A student can receive credit for at most two make-up assignments, and no make-up work will be accepted after the last day of class.

 

Class attendance is expected.

 

Required Documentation of Programming Assignments

 

1.    source listing of the program

Do not delete the source program until the graded assignment has been returned to you. Keep all returned assignments.

2.    evidence of correctness

Design a collection of data sets, use them to test the program, and turn in an ANNOTATED collection of test runs. You annotations must indicate why each test is included and how the correctness of the results was determined.

 

Grading Criteria for Programming Assignments

 

1.    The program must be correct.

Up to 100% may be deducted for programs that give incorrect results (using either student’s or instructor’s data), or that are not demonstrated to be correct.

2.    The program must show good style.

Up to 40% may be deducted for programs that do not show good style. Among the features of goos style are:

-- clean modular design

-- mnemonic variable names

-- readable

-- indentation used to show structure

-- functions and their interfaces are clearly defined

-- features of the language are used to advantage

 

NOTICE: There WILL be homework due for credit during the last week of class.

 

There will be approximately 14 assignments, mostly programming.

 

Computation of course grade

 

40% assignments

30% mid-term exam

30% comprehensive final exam

 


©Jeffrey Van Baalen, 2005.