edits
authorChris <chris.barker@nyu.edu>
Thu, 12 Mar 2015 01:38:05 +0000 (21:38 -0400)
committerChris <chris.barker@nyu.edu>
Thu, 12 Mar 2015 01:38:05 +0000 (21:38 -0400)
exercises/_assignment7.mdwn

index d351b1b..587a1e0 100644 (file)
@@ -24,27 +24,9 @@ does not perform reductions in those positions.
 
 <!-- just add early no-op cases for Ka and Sab -->
 
 
 <!-- just add early no-op cases for Ka and Sab -->
 
-3. In the previous homework, one of the techniques for controlling
-evaluation order was wrapping expressions in a `let`: `let x = blah in
-foo`, you could be sure that `blah` would be evaluated by the time the
-interpreter considered `foo` (unless you did some fancy footwork with
-thunks).  That suggests the following way to try to arrive at eager
-evaluation in our Haskell evaluator for CL:
-
-    reduce4 t = case t of
-      I -> I
-      K -> K
-      S -> S
-      FA a b -> 
-        let b' = reduce4 b in
-        let a' = reduce4 a in
-        let t' = FA a' b' in
-          if (is_redex t') then reduce4 (reduce_one_step t')
-                           else t'                                
-
-Will this work?  That is, will `reduce4 (FA (FA K I) skomega)` go into
-an infinite loop?  Run the code to find out, if you must, but write
-down your guess (and your rationale) first.
-
-<!-- Doesn't work: infinite loop. -->
+3. Converting to lambdas.  Using the type definitions you developed in
+homework 5, rebuild the evaluator in OCaml to handle the untyped
+lambda calculus.  Making use of the occurs_free function you built,
+we'll provide a function that performs safe substitution.
+