moved zipper,intro_contin -> week11
[lambda.git] / hints / assignment_7_hint_5.mdwn
index 40df3b8..779fb2e 100644 (file)
@@ -1,3 +1,15 @@
+<!--
+I would like to propose one pedegogical suggestion (due to Ken), which
+is to separate peg addition from non-determinacy by explicitly adding
+a "Let" construction to GSV's logic, i.e., "Let of var * term *
+clause", whose interpretation adds a peg, assigns var to it, sets the
+value to the value computed by term, and evaluates the clause with the
+new peg in place.  This can be added easily, especially since you have
+supplied a procedure that handles the main essence of the
+construction.  Once the Let is in place, adding the existential is
+purely dealing with nondeterminism.
+-->
+
 *      How shall we handle \[[&exist;x]]? As we said, GS&V really tell us how to interpret \[[&exist;xPx]], but for our purposes, what they say about this can be broken naturally into two pieces, such that we represent the update of our starting set `u` with \[[&exist;xPx]] as:
 
        <pre><code>u >>= \[[&exist;x]] >>= \[[Px]]
@@ -49,7 +61,7 @@
        <pre><code>bind_set (bind_set u \[[&exist;x]]) \[[Px]]
        </code></pre>
 
-*      Let's compare this to what \[[&exist;xPx]] would look like on a non-dynamic semantics, for example, where we use a simple reader monad to implement variable binding. Reminding ourselves, we'd be working in a framework like this. (Here we implement environments or assignments as functions from variables to entities, instead of as lists of pairs of variables and entities. An assignment `r` here is what `fun c -> List.assoc c r` would have been in [week6](
+*      Let's compare this to what \[[&exist;xPx]] would look like on a non-dynamic semantics, for example, where we use a simple reader monad to implement variable binding. Reminding ourselves, we'd be working in a framework like this. (Here we implement environments or assignments as functions from variables to entities, instead of as lists of pairs of variables and entities. An assignment `r` here is what `fun c -> List.assoc c r` would have been in [week7](
 /reader_monad_for_variable_binding).)
  
                type assignment = char -> entity;;