This page gives access to code examples in the course library.
You can use the table of contents (on the web) to jump directly to the kind of example you are looking for.
If you click on a Scheme file name and your browser tries to download a plugin (e.g., for a Lotus Screen Cam Movie), then you need to change your browser's rules for associating file suffixes with viewers. One way to do this on Windows (95/98) is to go into the Windows Explorer, and click on "View" then "Folder Options", then click on the "File Types" tab, and then enter a new file type for .scm files.
list-copy-mod.scm, list-copy is a prototype for these kinds of procedures, although it doesn't seem to do much.
list-length-mod.scm (list-length)
add1-to-each-mod.scm (add1-to-each)
make-all-positive-mod.scm (make-all-positive)
mapcdr-mod.scm (mapcdr)
list-map-mod.scm (list-map)
delete-even-mod.scm (delete-even)
nat-leq-mod.scm (nat-leq)
nth-element-mod.scm (nth-element)
unary-notation-mod.scm (unary-notation)
expt-maker-mod.scm (expt-maker)
Write Scheme code to:
lambda*.scm, for example lambda-1-exp.scm
Understand:
dot-notation-mod.scm (dot-notation)
In most files have type annotations (try the Unix command: grep deftype *.scm)
Write Scheme code using expressions, statements, and definitions.
nth-element-mod.scm (nth-element), among many other examples in lib.
Understand:
sym-exp-mod.scm (parse-s-list)
remove-sym-exp-with-map.scm (remove-s-list)
expt-maker-mod.scm (expt-maker)
../typedscm/testing.scm (testing:eval-print-maker, testing:regression-test-maker-maker, ...)
../typedscm/tc-type-helpers.scm (tc:axiom-helper, tc:rule-helper, etc.)
vector-generator-mod.scm (see vector-generator-mod.tst and vector-map-mod.scm for how it's used)
sum-mod.scm (sum)
product-mod.scm (product)
atomic-tree.scm (tree)
set-ops-as-vector.scm (set-of, set-union*)
nat-leq-mod.scm (nat-leq)
set-ops-as-vector.scm (set-member?, set-subset?, set-equal?)
all-mod.scm (all)
some-mod.scm (some)
../typedscm/tc-type-helpers.scm (tc:rule-or-helper, tc:sequence)
../typedscm/tc-type-helpers.scm (tc:sequence, ...)
lambda*.scm, for example lambda-1-exp.scm
The document defining our type notation, which uses BNF.
../typedscm/tc-output-type-expr.scm
See also Gary T. Leavens, `` Following the Grammar,'' Department of Computer Science, Iowa State University, TR #05-02a, February 2005, revised January 2006.
sum-mod.scm (sum-of-list)
product-mod.scm (product-of-list)
../typedscm/tc-util.scm (tc:last-item, tc:some, tc:member?, tc:filter, tc:find-duplicates, ...)
../typedscm/chez/tc-ignore-types-at-runtime.scm (list-of)
select-outerwear-mod.scm (select-outerwear), which is an example using the temperature grammar (only alternatives, no recursion).
iseq-map-mod.scm (iseq-map), which is an example using the infinite sequence grammar (only recursion, no alternatives).
valid-number-mod.scm (valid-number), which is an example using the phone number grammar (multiple nonterminals, no recursion).
double-size-mod.scm (double-size) which is an example using the window-layout grammar.
negate-bexp-mod.scm (negate-bexp), which is an example using the boolean expression grammar.
targets-mod.scm (targets), which is an example using the statement-expression grammar.
remove-named-mod.scm (remove-named), which is an example using the SXML grammar (an abstract syntax for XML).
lambda-1-quote-exp-examples.scm
../typedscm/tc-output-type-expr.scm
../typedscm/tc-type-translate.scm (tc:type-vars, tc:output-type-vars, tc:nest-args, tc:type-unnest-args, tc:substq-all-output)
try these using sym-exp-cooked.scm, also instead of sym-exp-mod.scm
Examples of full recursion are found in the section above on deriving recursive programs from grammars. Compare the code for the fully recursive product-mod.scm with the tail recursive code in product-tail-recursive.scm. Note the pending computations surrounding the recursive calls in the fully-recursive version.
../typedscm/tc-util.scm (tc:last-item)
vector-map-bang-mod.scm (vector-map!)
whos-on-first-mod.scm (get-context, try-strong-cues, try-weak-cues)
../typedscm/tc-util.scm (tc:find-duplicates)
../typedscm/chez/tc-ignore-types-at-runtime.scm (vector-of)
lambda-1-exp-examples.scm (free-vars, free?, bound-vars, bound?)
combinator-tools.scm (occurs-free-in?)
see also combinator-tools.scm
The abstract syntax in chapter 3 of the EOPL text is a classic example of this.
../typedscm/tc-type-translate.scm (tc:type-vars, tc:external-type-vars, tc:nest-args, tc:type-unnest-args, tc:substq-all-external)
combinator-tools.scm (toCombinators, interpret, toLambda, occurs-free-in?)
seq-as-proc.scm transformed to seq-as-ast.scm. The library also has some representation-independent tests for these that are used by seq-as-proc.tst and seq-as-ast.tst.
environment-as-proc.scm transformed to environment-as-ast.scm. See also the optimized ribcage representation in environment-as-ribcage.scm. The library also has some representation-independent tests for these that are used by environment-as-proc.tst, environment-as-ast.tst, and environment-as-ribcage.tst.
phone-book-as-proc.scm transformed to phone-book-as-ast.scm and optimized to a ribcage representation in phone-book-as-ribcage.scm The library also has some representation-independent tests for these that are used by phone-book-as-proc.tst, phone-book-as-ast.tst, and phone-book-as-ribcage.tst.
road-map-as-proc.scm transformed to road-map-as-ast.scm The library also has some representation-independent tests for these that are used by road-map-as-proc.tst and road-map-as-ast.tst.
Last modified $Date: 2006/04/20 02:27:50 $.