This is the page for CSE130 (Summer Session II, 2015).

If you need assistance outside of lecture or discussion:

Course Schedule

Day Material Readings
08/03 Lecture 1: Course overview, Syntax and grammars SICP 1.1, 1.2
08/05 Lecture 2: EBNF, Scheme primitives, Special forms SICP 1.3
08/10 Lecture 3: Iteration and tail calls, Block structure SICP 2.1
08/12 Lecture 4: Lists, Types, Higher-order procedures SICP 2.2, 2.3, 2.4
08/17 Lecture 5: Environment encapsulation, Fixed points, Dotted tails SICP 2.5, 3.1, 3.2
08/19 Lecture 6: Quoting, Tagged data SICP 3.3, 4.1
08/24 Lecture 7: Mutation, Environments, The interpreter SICP 3.3, 4.1
08/26 Lecture 8: Continuations, CPS Dybvig 3.3, 3.4
08/31 Lecture 9: Logical programming, Lambda calculus SICP 3.5, 4.4
09/02 Lecture 10: Review
09/04 Final examination

Written Assessments

Four written assessments will be handed out in class and due back by the next class.

  1. WA #1 - Physical copy turnin due by: Monday, August 17 at the start of lecture.
  2. WA #2 - Physical copy turnin due by: Wednesday, August 26 at the start of lecture.
  3. WA #3 - Physical copy turnin due by: Monday, August 31 at the start of lecture.
  4. WA #4 - Physical copy turnin due by: Wednesday, September 2 at the start of lecture.

A Scheme Interpreter

The main course project is writing a Scheme interpreter in Java. The task is broken down into several parts:

  1. Part One: A Scanner for Scheme Tokens - Write a scanner (also known as a lexical analyzer, or a tokenizer).
  2. Part Two: A Datum Parser - Write a parser for Scheme-style S-Expressions.
  3. Part Three: A Turing-Complete Evaluator - Complete your Scheme interpreter by following the process described in SICP 4.1.

Compiling and Testing Your Interpreter

  1. Make a project directory; e.g., interpreter.

  2. Download the starter code file: schemeProjectStarter.zip.

    Move the extracted org directory into your interpreter directory.

  3. Download the tester jar: tester.jar and move it into your interpreter directory.

    (You may view the test data directly, by extracting the contents of the jar file, if you would like.)

  4. Build your interpreter directly with javac:

    $ mkdir classes
    $ javac -d classes -source 8 -target 8 `find org -name \*.java -print`
  5. Build a jar file for your (compiled) interpreter:

    $ jar cfe scheme.jar org.instructures.interp.SchemeEvaluator -C classes .
  6. After you have built your scheme.jar you can run the tests.

    To run the tests on your scanner, use the scan option:

    $ java -jar tester.jar scheme.jar scan

    The other options you can use are parse and eval.

  7. An HTML report can built using the --html flag:

    $ java -jar tester.jar --html scheme.jar scan
  8. To execute your program directly for just a single test file (that is, if you've extracted the contents of the tester.jar file first), you can use the scheme.jar file as a classpath:

    $ cd testdata/run
    $ java -cp ../../scheme.jar org.instructures.interp.TokenScanner cps-product.scm

Meeting Times

Section: 845917 Day Time Location
Lecture Mon/Wed 2:004:50pm Center Hall 113
Discussion Tue/Thu 3:003:50pm Center Hall 113
Final Fri, 09/04 3:005:59pm Center Hall 113