Re: Procedural attachment in PowerLoom

Hans Chalupsky <[email protected]> Fri, 17 Nov 2006 17:42:44 -0800
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
Cameron,

PowerLoom does support the attachment of native procedures to
relations either as computations or reasoning specialists.  These
procedures can compute a value or do some special-purpose reasoning
implemented in code (examples are arithmetic computations, comparison
operators, reasoning with units and measures, etc.).

There are also demons that you can attach to relations that fire when
a propositions becomes true or false or unknown via
assertion/retraction or during forward inference.

I'm not sure that's the kind of procedural attachment you are looking
for.  There is nothing that you can link to the firing of a rule
(PowerLoom is not a production system), unless you make it a forward
rule and attach a demon to the relation in the consequent.  For
example (note the =>> arrow marking this as a forward-only rule):

(assert (=>> (and (rich ?x) (beautiful ?x)) (happy ?x)))
(assert (goes-true-demon happy my-happy-demon))

Whenever the above rule infers somebody to be happy, `my-happy-demon'
would run with the proposition that became true as an argument.  You
can look at PL-KERNEL/assert-synonym-demon in
powerloom/sources/logic/specialists.ste as an example.

The demon code doesn't necessarily have to be written in STELLA, even
though it might be a bit easier depending on what you want it to do.
We currently support registration of a native function as a specialist
via pli/register-specialist-function, we might have to write something
similar for demons, but that would be fairly easy to do.

Hans

--------------------------------------------------------------------------
Hans Chalupsky, PhD                     USC Information Sciences Institute
Project Leader, Loom KR&R Group         4676 Admiralty Way
<[email protected]>                          Marina del Rey, CA 90292
(310) 448-8745
--------------------------------------------------------------------------

>>>>> Cameron Ross <[email protected]> writes:

> Hello PowerLoom list,
> I'm currently evaluating PowerLoom as a possible KR&R engine for a 
> project I'm working on.  One of the requirements of this project is that 
> it must be possible to trigger native procedures (i.e. Java methods) 
> when certain rules within the knowledge-base fire.  Is this sort of 
> functionality currently supported in PowerLoom?  If not, would it be 
> possible to add such support.  Note that I have programming resources 
> available that wish to dig into STELLA if required.

> Cheers,
> Cameron Ross
> President
> Symboticware Incorporated

> _______________________________________________
> powerloom-forum mailing list
> [email protected]
> http://mailman.isi.edu/mailman/listinfo/powerloom-forum