Harvey Mudd College

Computer Science 60

Principles of Computer Science
Fall 2010

Instructor: Prof. Bob Keller, Olin 1253, x-18483, keller at cs  hmc edu, AIM: MuddProf, Hours: MTW 4-5:30 and as otherwise available.

Meets: MW 2:45-4:00, Parsons 1285

Grading: Homework 60%, Midterm 10%, Final 25%, Participation 5%

Languages we use: Racket (the language formerly known as Scheme), Java, Prolog

 

CS 60 is oriented toward concepts. We currently use three different languages to illustrate those concepts. However, the purpose is not to teach those languages as much as it is to use them as vehicles for the concepts. The expectation is that, once those concepts are learned, they can be applied in the context of other languages, although the difficulty may vary with the language chose.

 

Catalog Description

 

Accelerated breadth-first introduction to computer science as a discipline for students (usually first-year) who have some programming background. Computational models of functional, object-oriented, and logic programming. Data structures and algorithm analysis. Computer logic and architecture. Grammars and parsing. Regular expressions. Computability. Extensive practice constructing applications from principles, using a variety of languages. Prerequisite: Permission of Instructor.  3 credit hours.  (Fall.)

 

Assignments and Useful Links

Assignments will be posted here as they are issued. Note: Assignments are always due at 11:59 p.m. on the day indicated. They are submitted using our web-based submission site: http://www.cs.hmc.edu/~submissions/submissions/: .

á      Late work policy: At the price of one "Euro" per late submission, you may submit up to 9 p.m. on the day after the due date, up to three times without penalty. Submissions after that will not be accepted except in extenuating circumstances cleared with the instructor.

á      Current Grutor Schedule

á      On-Line Version of a Book covering much of the course material,
written by the instructor (same concepts, but uses rex rather than Racket)

á      Racket Guide (html) | Racket Manual (html)

á      How to Design Programs (aka "htdp"), an on-line textbook with examples using Scheme, the predecessor to Racket, originally published by MIT Press

á      Racket Quick Reference Card (4 page pdf)

á      Slides on High-Level Functional Programming (6-up)
á      Slides on Low-Level Functional Programming (6-up)
á      Slides on Designing a Unicalc Language (6-up)
á      Slides on Language, Grammar, Parsing (6-up)
á      Slides on Sequential Logic and Object-Oriented Programming (6-up)
á      Slides on Exceptions and Graphics 
á      Slides on Threads (6-up)
á      Slides on Garbage Collection (6-up)
á      On the "mod 3" finite-state acceptor
á       Slides on Finite-State Machines (6-up)
á    Lecture Slides on Prolog    (6-up version)
Prolog Examples:
  exam.pro (How to pass an exam)
  ancestor.pro (Ancestry)
  tutors.pro (Tutoring Database)
  set_flags.pro (Turning off annoying print limitation in SWI-Prolog)
  range.pro (range predicate; shows how to load set_flags.pro)
  max.pro (max of a list)
  exmax.pro (max of a list with index)
  exmax2.pro (max of list with index, using -> ... ; ...)
  map.pro (mapping a predicate)
  enumerate.pro (Enumeration Utility)
  sexp.pro (S-expression parser)
  
áLectures Slides on Advanced Prolog    (6-up version)

á      sampler.rkt (Racket sample definitions)
á      test-setup.rkt (Unit testing illustration)
á      fold-demo.rkt (Exposition of foldl and foldr)
á      List kata (definitions discussed in class)
á      Code from Class, 15 Sept. 2010 
á      Assignment 1 (Functional Programming Warmup) Due Wed. 8 September 2010 at 11:59 p.m.
á      Assignment 2 (KWIC Index API) Due Wed. 15 September 2010 at 11:59 p.m.
á      Assignment 2 input/output in Racket
á      a02convertTriples.rkt
á      Wikipedia article
á      A fancy example of a KWIC index (web-based, click letters at bottom)
á      Assignment 3 (Unicalc API and CLI) Due Wed. 22 September 2010 at 11:59 p.m.
á      unicalc-db.rkt (for assignment 3)
á      a03 + lambda solution
á      a03APItests (API tests for assignment 3)
á      a03CLItests (CLI test input for assignment 3)
á      a03CLItestsOut (CLI test output for assignment 3)
á      a03.dmg (stand-alone disk image for MacOSx)
á      Assignment 4 (Unicalc Language) Due Wed. 29 September 2010 at 11:59 p.m.
á      a04CLItests.txt (CLI test input for assignment 4)
á      a04CLItestsOut.txt (CLI test output for assignment 4)
á      a04 CLI tests as a spreadsheet (CLI test input and output for assignment 4)
á      Assignment 5 (User-Friendly Unicalc Language) Due Wed. 7 October 2010 at 11:59 p.m.
á      S-expression parser 
á      S-expression parser with translator to Racket structures 
á      Command-line tests for a05 
á      Results of command-line tests for a05 
á      Solution for a05 (and a04) 
á      Assignment 6
á      Assignment 6 Javadoc
á      Assignment 6 jUnit tests (Note: Preliminary!)
á      Final Assignment 6 jUnit tests (two more tests added)
á      openlist package starter
á      Assignment 7
á      slog.zip (zipped project directory)
á      slogB.zip (fix for Windows)
á      Assignments 8 and 9
á      Directed Graph Search Examples (Depth-First, Breadth-First, Iterative Deepening in Java)
á      Imporant Information about using HashMap (zipped source files)
á      Student DESC Applets
á      Assignment 10
á      Sample solution to Assignment 10 (Netbeans project file)
á      Javadoc for Assignment 10 (Regex and hints)
á      Regex package for Assignment 10 (zipped source files) 
á      Unit tests for Assignment 10  (zipped source files)
á      LinkedList Modification Example  (Java source file)
á      Assignment 11 (Prolog source text file)
á      Assignment 11 solution
á      movies.pro (Prolog source text file for movies database)
á      Optional Assignment 12 for Extra Credit (Prolog source text file)
á      Sample CS 60 Final
á      Final Review

á      Download SWI-Prolog

á      More Free Prolog Implementations

á      Learn Prolog Now

á      Download Dr. Racket

á      WeScheme website (web editor for Scheme)

á      Java Syntax Reference

á      Wikipedia Java Syntax article

á      Java Platform (library classes)

á      Introduction to Java Tutorial

á      Java Language Basics

á      Tutorials on Many Aspects of Java

á      Download Java

á      Download Dr. Java

á      Download Netbeans (Alternative to Dr. Java)

á      Download Eclipse (Alternative to Dr. Java)

Approximate Syllabus

Day

Date

Topics

Wed.

9/1

Data modeling by lists, S-Expressions, Racket language, Functions, Association Lists

Mon.

9/6

High-Level Functional Programming, Problem Decomposition, Anonymous Functions

Wed.

9/8

Low-Level Functional Programming, Recursion, Number representation

Mon.

9/13

Propositional Logic Functions, Functional Completeness, Logic simplification

Wed.

9/15

Lists vs. Arrays, Complexity considerations

Mon.

9/20

Directed Graphs and Relations, Graph Searching

Wed.

9/22

Trees and DAGs, DijkstraÕs Algorithm

Mon.

9/27

Language Interpreter in Racket

Wed.

9/29

Open List Implementation in Java

Mon.

10/4

Exceptions, Copying and Equality

Wed.

10/5

Abstractions and Interfaces, Higher-Order Functions in Java

Mon.

10/11

Enumerations, Closed Lists, Inner Classes,

Wed.

10/13

Inheritance, Abstract Classes, Event-Handling, Graphics

Mon.

10/18

Fall Break

Wed.

10/20

Take-home Mid-term exam

Mon.

10/25

Threads, Garbage Collection

Wed.

10/27

Grammars and Parsing

Mon.

11/1

Finite-State Machines, Regular Expressions

Wed.

11/3

Logic synthesis, Hardware components

Mon.

11/8

Turing Machines

Wed.

11/10

Predicate logic, Prolog and databases

Mon.

11/15

Non-determinism and Backtracking

Wed.

11/17

Computer architecture, Assembly language

Mon.

11/22

Constructing a compiler

Wed.

11/24

No class the day before Thanksgiving

Mon.

11/29

Program correctness

Wed.

12/1

Complexity, Algorithm design

Mon.

12/6

Undecidability, the Halting Problem

Wed.

12/8

Incomputability Reductions

Wed.

12/15

Final Exam, 2-5 pm