JESS: Backward Chaining in Jess

View: New views
2 Messages — Rating Filter:   Alert me  

JESS: Backward Chaining in Jess

by Henschel, Jörg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

we are examining the use of backward chaining with Jess and have come across a few point that we'd like to clarify.

Specifically, it seems that function calls are not possible in a rules LHS, such as

  (deftemplate Bunny)
  (do-backward-chainning Bunny)

  (defrule print-carrot-cout2    
     ?app <- (Bunny (weight 11) {carrots > 15})
   =>  
     (printout t "The carrot count is " ?app.carrots crlf)
  )

Here, the ">" causes a problem.

So, at least in regards to operators, it seems that ==, !=, && are possible, whereas ||, <>, <=, >=  don't work.

Are we doing something drastically wrong, or is that a real restriction of Jess' backward chaining capabilities?

Thanks for any input,

Joerg Henschel


--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users you@...'
in the BODY of a message to majordomo@..., NOT to the list
(use your own address!) List problems? Notify owner-jess-users@....
--------------------------------------------------------------------


Re: JESS: Backward Chaining in Jess

by Ernest Friedman-Hill :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, you're not doing anything wrong. Goal patterns in Jess's limited  
backward-chaining implementation can't contain functions, just as the  
rule compiler should be reporting to you.


On Aug 25, 2009, at 11:11 AM, Henschel, Jörg wrote:

> Hi,
>
> we are examining the use of backward chaining with Jess and have  
> come across a few point that we'd like to clarify.
>
> Specifically, it seems that function calls are not possible in a  
> rules LHS, such as
>
>  (deftemplate Bunny)
>  (do-backward-chainning Bunny)
>
>  (defrule print-carrot-cout2
>     ?app <- (Bunny (weight 11) {carrots > 15})
>   =>
>     (printout t "The carrot count is " ?app.carrots crlf)
>  )
>
> Here, the ">" causes a problem.
>
> So, at least in regards to operators, it seems that ==, !=, && are  
> possible, whereas ||, <>, <=, >=  don't work.
>
> Are we doing something drastically wrong, or is that a real  
> restriction of Jess' backward chaining capabilities?
>
> Thanks for any input,
>
> Joerg Henschel
>

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com







--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users you@...'
in the BODY of a message to majordomo@..., NOT to the list
(use your own address!) List problems? Notify owner-jess-users@....
--------------------------------------------------------------------