[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jeff Morrill: MOP hacks]



    Date: Fri, 2 Nov 1990 15:20 EST
    From:	kanderso@DINO.BBN.COM


    I asked some of our slot hackers to describe their experience to
    support this discussion.  This is a response from Jeff Morrill.  Tom
    Reinhardt also has some interesting experience with this, and
    described some of it in detail at a CLOS workshop at OPSLA 1989.

    k
    ------- Forwarded Message

    Date: Fri, 2 Nov 90 13:33 EST
    From: Jeff Morrill <jmorrill@BBN.COM>
    Subject: MOP hacks
    To: kanderson@BBN.COM
    cc: jmorrill@BBN.COM, delatizky@BBN.COM, treinhardt@BBN.COM
    Message-ID: <19901102183324.2.JMORRILL@adams.bbn.com>

    Ken,

    You asked for a description of what I have done with the mop.  Here are the highlights.

    1.  Definition of SLOT-FILLER-MIXIN, a metaclass.

    In my expert system, a "slot-value" is really a structure containing (1) the
    "real" value, and (2) a pointer to the RULE responsible for inferring that
    value (used to construct explanations).  Once uncertainty is supported, I
    should like to include a DISTRIBUTION OF BELIEF as the "value" of the slot.

    I have hacs to slot-value-using-class (:around methods) that get the structure
    and pull out the "real" value.  I have added a method called slot-explanation-using-class
    that gets the structure and pulls out the rule pointer.  

    I was very upset that Symbolics chose to hardcode the optimization of SLOT-VALUE, 
    thus I have no recourse as I did in PCL to un-optimize calls for certain classes.
    Thus my code doesn't work unless I call slot-value-using-class directly.  So I have
    my own version of slot-value in a different package that never gets optimized.
			
You can't tell when not to do the optimization, since the method doesn't
know the exact class.  However, mapping tables have escape mechanisms in
them for just this sort of thing, so this can be made to work, as long
as only one value was to be returned.  It would be impossible to make an
optimized SLOT-VALUE return multiple values or no values (I also think
that this would be an invalid thing to do in ANSI CL).