assignment7 tweaks
authorJim Pryor <profjim@jimpryor.net>
Thu, 18 Nov 2010 23:36:01 +0000 (18:36 -0500)
committerJim Pryor <profjim@jimpryor.net>
Thu, 18 Nov 2010 23:36:01 +0000 (18:36 -0500)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
assignment7.mdwn
hints/assignment_7_hint_1.mdwn
hints/assignment_7_hint_2.mdwn
hints/assignment_7_hint_3.mdwn

index dd325bb..0d5d45a 100644 (file)
@@ -10,7 +10,7 @@
 
        Some advice:
 
-       *       You don't need to re-express the epistemic modality part of their semantics, just the treatment of indefinites. Though extra credit if you do the whole thing.
+       *       You don't need to re-express the epistemic modality part of their semantics, just their treatment of extensional predicate logic. Though extra credit if you want to do the whole thing.
 
        *       You'll want to use the implementation of "implicitly represented" mutable variables that we discussed at the end of this week's meeting, or the "state monad" Chris presented, which is a simple version of the former.
 
index 6725def..0d67cd9 100644 (file)
@@ -3,7 +3,7 @@
 
 *      Where they represent pegs as natural numbers, that corresponds to our representing locations in a store by their indexes in the store.
 
-*      Where they say "reference system," which they use the leter `r` for, that corresponds to what we've been calling "assignments", and use the letter `g` for.
+*      Where they say "reference system," which they use the leter `r` for, that corresponds to what we've been calling "assignments", and have been using the letter `g` for.
 
 *      Where they say `r[x/n]`, that's our `g{x:=n}`.
 
index 16e66e1..0b1c59f 100644 (file)
@@ -5,11 +5,14 @@
 
        However, since we haven't studied these, we will just combine the reader monad and the state monad in an ad hoc way. The easiest way to do this is to think of the assignment function and the store of reference cells as a combined state, which gets threaded through the computations in the same way that simple states did in your earlier homeworks.
 
-       We'll call these "discourse possibility monads," and let them have the following type:
+       We'll call these "discourse possibility monads," and type them as follows:
 
                type entity = Bob | Carol | Ted | Alice;;
+               let domain = [Bob; Carol; Ted; Alice];;
+               type var = char;;
+               type assignment = var -> int;; (* variables are bound to indexes into the store *)
                type store = entity list;;
-               type assignment = char -> int;; (* variables are bound to indexes into the store *)
+
                type 'a discourse_possibility = 
                        (* we ignore worlds *)
                        assignment * store -> 'a * assignment * store
index ed6bc36..4951100 100644 (file)
@@ -3,7 +3,7 @@
 
 *      They say the denotation of a predicate is whatever extension the world `w` associates with the predicate. Since we don't have worlds, this will just be an extension.
 
-*      They say the denotation of a variable is the object which the store `g` assigns to the index that the assignment function `r` assigns to the variable. In other words, if the variable is `'x'`, its denotation wrt `(r, g, w)` is `g[r['x']]`.
+*      They say the denotation of a variable is the object which the store `g` assigns to the index that the assignment function `r` assigns to the variable. In other words, if the variable is `'x'`, its denotation wrt `(r, g, w)` is `g[r['x']]`. In our OCaml implementation, that will be `List.nth g (r 'x')`.
 
 We're going to keep all of that, except dropping the worlds. And instead of talking about