Re: Question about implications and contexts

Thomas Russ <[email protected]> Mon, 28 Apr 2008 10:17:36 -0700
Newsgroups gmane.comp.ai.loom
Message-ID <[email protected]>
On Apr 25, 2008, at 10:05 AM, Robert Goldman wrote:

> What I would like to be able to do is to explore *tentative*
> implications using contexts.  I am not sure if this is feasible, and  
> if
> so, whether I'm doing this wrong.

...

> Is there any way to make implications that are only visible in a child
> context and hidden from the parent?  What I am really after is the
> ability to have *undoable* implications; implications that I can add  
> and
> then remove.

Unfortunately, this is not supported by the Loom context mechanism.

Background:  Contexts were added relatively late in the Loom  
development process, IIRC around release 3.0, and they affect only the  
ABox information.  The TBox information, which includes the  
implications associated with concepts is not context-sensitive.  So  
you will not be able to have different rules associated with the  
concepts in different contexts.  The mechanisms involved in the  
normalization of concept definitions and the inference mechanisms were  
too extensive for us to be able to add context support to them, at  
least not in a way that we felt would be both reliable and efficient.

So, that means that what you want to do cannot be done using Loom.   
This is one area where PowerLoom has more flexibility, since the  
context mechanism was available there from the start.

>
>
> What I did was the following:
>
> (define-context 'foobar :theory nil)
> (define-context 'bletch :theory '(foobar))
> (push-context 'foobar)
> (define-concept 'p)
> (define-concept 'q)
> (define-concept 'r)
> (implies p q)
> (pc p)
>
> gives me:
>
> (defconcept P
>   :is-primitive Thing
>   :implies (:and Q P)
>   :context Foobar)
>
> Now
>
> (push-context 'bletch)
> (implies p r)
>
> Now pc gives me:
>
> (defconcept P
>   :is-primitive Thing
>   :implies (:and Q P R)
>   :context Foobar)
>
> Now I pop the context, and when I pc p, I get
>
> (defconcept P
>   :is-primitive Thing
>   :implies (:and Q P R))
>
> I was surprised by this --- I expected that back in the Foobar  
> context I
> would see only :implies (:and q p).
>
> Is there any way to make implications that are only visible in a child
> context and hidden from the parent?  What I am really after is the
> ability to have *undoable* implications; implications that I can add  
> and
> then remove.
>
> Thanks,
>
> R

_______________________________________________
Loom Knowledge Representation Language Forum
[email protected]
Change subscription: http://mailman.isi.edu/mailman/listinfo/loom-forum