CS 307 Midterm Exam 1 Study Guide

Date: Friday, October 5, 2001, in class.


Hailperin, Chapters 1, 2, 3, 4, 7.

Lisp Topics:

Lisp Functions:

You should know the following Lisp functions. Be able to give the result for a simple call to each function.


Write Scheme programs for each of these:


You will be asked to write definitions for terms selected from the list below. Definitions are given at the back of the lecture notes.
 actual parameter          algorithm             ALU
 assignment statement      assignment            argument 
 auxiliary function        base case             bignum
 big O() notation          binary                binding
 bit                       Boole, George         Boolean
 Boolean algebra           central processor     combination
 compiler                  conditional           constant
 count-controlled loop     CPU                   data type
 dynamic type checking     dynamic storage       dotted pair
                           environment           evaluation
 event-controlled loop     exact number          exponent
 external representation   fixed-point           GIGO
 floating-point number     formal parameter      function              
 high-level language       global variable       identifier
 implicit begin            inexact number        infinite loop
 internal representation   integer               interpreter
 invariant                 invocation            iteration
 lexical scoping           Lisp                  list
 local variable            loop                  Lovelace, Ada
 machine language          mantissa              memory
 mnemonic                  operation             pair
 parameter                 pointer               predicate
 procedure                 prompt                quote
 random-access memory      RAM                   rational
 read-eval-print loop                            real
 recursion                 register              Scheme
 scope                     scope rules           S-expression
 side effect               special form          stack frame
 state                     subprogram            subroutine
 symbol                    tail recursion        top level
 top level of a list       type                  value

Box Diagrams:

Give the box diagrams for each of these:

Box Diagrams:

Give the list structure for each of these: