From @life.ai.mit.edu:ziggy@hx.lcs.mit.edu Mon Oct 28 21:18:13 1991
Received: by hx.LCS.MIT.EDU (5.51/4.7); Mon, 28 Oct 91 21:18:11 EST
Received: from life.ai.mit.edu by mintaka.lcs.mit.edu id aa20555;
          28 Oct 91 21:16 EST
Received: from hx.LCS.MIT.EDU by life.ai.mit.edu (4.1/AI-4.10) id AA00621; Mon, 28 Oct 91 21:16:17 EST
Received: by hx.LCS.MIT.EDU (5.51/4.7); Mon, 28 Oct 91 21:16:10 EST
Date: Mon, 28 Oct 91 21:16:10 EST
From: "Michael R. Blair" <ziggy@hx.lcs.mit.edu>
Message-Id: <9110290216.AA19406@hx.LCS.MIT.EDU>
To: 6001-staff@ai.mit.edu
Subject: PS6 tutorial env diagram
Status: R

Intro
-----
I'm sure you've all realized that PS6 tutorial problem 3 is a lot of work.
Here is how I ran things today...with some comments at the end about how we
should probably modify the question for future terms to reduce the work load.
Over-all I think this simple question raised all the interesting issues of our
OOPS style so the students came away with a deepened sense of how things fit
together in our imaginary world. Most of my students were pretty psyched at the
end of all the env diagram drudgery and many of them commented that they never
would have realized how things really were working without hacking out the env
diagram. Anyway, here's how I ran things...

What I do
---------
I had the students work through in detail how HAL-OFFICE looks by tracing how
it was created with (make-place 'hal-office) in detail then considering how
this structure was changed by the (can-go hal-office 'down tech-square) and
(can-go hal-office 'up eric-office), treating tech-square and eric-office as
blobs. (It turns out that nowhere in this tutorial exercise do we need to refer
to the neighbors of hal-office so this is not necessary... I just find it a
convenient way to trace through some ASK and GET-METHOD stuff once-over lightly
before asking for detailed env structure stuff.) We also looked at how Hal was
installed when (define hal (make&install-person 'hal hal-office 2)) was
evaluated, again without hacking out the details of all the intermediate env
structure created... we just made hal be a blob and added him to the THINGS of
hal-office.

Now that we have the full structure of Hal-office ironed out, we proceed with
(define being&time (make&install-thing 'being&time hal-office) in excruciating
detail. After the students recognize the pattern of creating internal
inheriting selves (namely, thing->mobile-object->named-object), I take a minute
to remind them of the overall design strategy: objects are really just
procedures that do a method dispatch based an a received message. It is ASK
that really makes things happen; the objects just determine what if anything
will happen. I got many ``oohs'' and ``aahs'' at this point.

Then we look at the evaluation of (ask thing 'install) within
make&install-thing.  We look at the call to get-method within ASK in some
detail until we see that THING uses inheritance of mobile-object to resignal
the method search (i.e., things call (get-method 'install mobile-obj)). At this
point, rather than hack out all the details of the new call to get-method, I
take over for a few minutes and fill in some missing env structure (supressing
some details, much to the students' delight) then hand things back over to the
students once the method is found. The students must recognize that the method
for INSTALL of mobile-objects is created on-the-fly (the LAMBDA is evaled at
dispatch time) and that the method must point to a particular env frame when
constructed. We punt the env struct details of the call to METHOD? but we look
at what the code does and talk about the case where we (ask hal 'get-a-job)
since this dramatizes what happens when we ask an object for a method it
doesn;t have. (They also get a kick out of teasing one of the lecturers.)

We follow the ensuing env structure development until we realize that the body
of this method is itself another call to ASK, at which point I again take over
and use a little hand-waving to get to the point where we are actually find the
appropriate method. We then continue until we encounter the (set! things
(cons new-thing things)) which the problem set says is the place where we can
stop. Usually, we go ahead and do the SET! just to see how the chain of env
frames at that point enables us to do the right thing. Some students are
surprised to realize (after I point it out to them) that of all the local
bindings that are created by passing PLACE down to successive internal selves,
it is the binding associated with MAKE-MOBILE-OBJECT that maintains the *real*
binding for a things place. None of the other bindings are kept up to date and
whenever we ask a thing for its place, we defer to the internal mobile-obj to
find it.

Summary
-------
In retrospect, I think the problem set statement is a bit confused in saying
that we can treat BEING&TIME as a blob since this is precisely what we should
be looking at in detail when asking it to INSTALL itself. I think instead it
should say that we can treat various other things as blobs (like tech-square,
eric-office, and hal (nothing personal, hal)) and that we should suppress some
detail (like repeated calls to ASK and other stuff where I usually run the show
for a few minutes). I will work on trying to clean this up for the future... in
general most students draw some of the env structure until they just give up in
exhaustion... as did I when preparing for tutorial. This has not really been a
problem though since the students don't seem particularly discouraged by this:
they just realize that large-scale env diagram hacking can be a messy business.
And they feel releaved and enlightened when we work all the details out in
tutorial. Interestingly, once all this groveling for tutorial problem 3 is
completed, they seem to thing that tutorial problem 4 is obvious. At the start
of tutorial almost everyone askes me what the answer to 4 is since they are
quite perplexed. I always say, ``Well, let's do 3 first and see what happens.''
They really like recognizing that they understand enough by the end to just
blurt out what happens in 4 without having to grovel in details.

Overall, I think this can be a very successful tutorial if you are careful to
stricke a balance between detail and pedagogy. I can see that if you let your-
self get too lazy or too rigid in showing absolutely everything that you can
easily lose the forest for the trees. Like I say, I'll try to re-structure the
question to make it a bit more quided next time around. For now, I hope this
email message will suffice as a guide to running this particular tutorial.

How did other folks handle this? Things to add? Did I blow something important?

zigaroo

From @life.ai.mit.edu:ziggy@hx.lcs.mit.edu Mon Oct 28 21:26:25 1991
Received: by hx.LCS.MIT.EDU (5.51/4.7); Mon, 28 Oct 91 21:26:23 EST
Received: from life.ai.mit.edu by mintaka.lcs.mit.edu id aa20963;
          28 Oct 91 21:25 EST
Received: from hx.LCS.MIT.EDU by life.ai.mit.edu (4.1/AI-4.10) id AA00759; Mon, 28 Oct 91 21:25:28 EST
Received: by hx.LCS.MIT.EDU (5.51/4.7); Mon, 28 Oct 91 21:25:19 EST
Date: Mon, 28 Oct 91 21:25:19 EST
From: "Michael R. Blair" <ziggy@hx.lcs.mit.edu>
Message-Id: <9110290225.AA19436@hx.LCS.MIT.EDU>
To: 6001-staff@ai.mit.edu
Subject: PS6 tutorial ... P.S.
Status: R


By the way, I also showed students my copy of Being and Time.
When asked what it was about, I told them ``well, I'd read to you
the liner notes that describe it except that nobody has ever managed
to read this book all the way through so all the liner notes say is
how important this book is but they say nothing about what is actually
in it. I'm not even sure Heidegger himself ever really read the whole
thing through and he wrote the stupid thing. Anyway, it sort of talks
about what it means for an object to exist in a world so we thought it
was a cute hack to mention it in our OOPS world. If you ever tried to
read it you'd probably get so confused you'd forget how to breathe so
you'd die on the spot, so I dont really suggest you read it... unless
you take Rota's course... it's sort of like Heideggerian CPR.''

But I only launched into this flame when directly asked what the book
was about. Only 2 of my 4 sections bothered to ask. I hope the others
don't go look up a copy in their local library over vacation thinking that
it's a cool book on OOPS.

 zig

