Your hints have been helpful. I was also looking for the pattern-matching
kind of OR.
JESS does  not seem to understand neither (a b | c | d)  nor (or (a b)(c
d)(e f)) as CLIPS and KBMS does.
If this is really the case, then JESS becomes less attractive for porting
KBMS rules.

Thanks for your help,
Morgan





Ernest Friedman-Hill <[EMAIL PROTECTED]> on 03/18/99 06:01:20
PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Morgan L. Yim)
Subject:  Re: JESS: KBMS rule translations




Jess has the ability to call arbitrary functions as part of rule LHS
execution. Among the supplied functions are (or), (and),  (not) (>),
and (<). You can create your own, too, very easily; for example,
(between) might look like

(deffunction between (?arg ?lower ?upper)
     (return (and (> ?arg ?lower) (< ?arg ?upper))))

The first part of your LHS might look like


(defrule rule-1
     ?s<- (station (road up)
                (state ?X&:(member$ ?X (create$ CALIFORNIA
                               COLORADO IDAHO ILLINOIS ...))))

I don't know what the 'retrieved' operator does, so I can't translate that.

I think [EMAIL PROTECTED] wrote:
>
>
>
> Hi,
>
> We are investigating JESS for the re-implementation of an existing expert
> system developed in KBMS. We need an opinion from people familiar with
JESS
> on how easy or hard it is to represent rules like the following sample:
>
> IF (STATION1.ROAD = UP
> & (STATION1.STATE = CALIFORNIA
>  OR STATION1.STATE = COLORADO
>  OR STATION1.STATE = IDAHO
>  OR STATION1.STATE = ILLINOIS
>  OR STATION1.STATE = IOWA
>  OR STATION1.STATE = KANSAS
>  OR STATION1.STATE = MINNESOTA
>  OR STATION1.STATE = MISSOURI
>  OR STATION1.STATE = MONTANA
>  OR STATION1.STATE = NEVADA
>  OR STATION1.STATE = OREGON
>  OR STATION1.STATE = TENNESSEE
>  OR STATION1.STATE = UTAH
>  OR STATION1.STATE = WASHINGTON
>  OR STATION1.STATE = WISCONSIN
>  OR STATION1.STATE = WYOMING
>  OR STATION1.STATE = NEBRASKA
>  OR ((RETRIEVED STATIONS INFO.STATE = ARKANSAS)
>         OR (CORRIDOR = 'JH' & MILE POST BETWEEN 567 AND 650))
>  OR (RETRIEVED STATIONS INFO.STATE = LOUISIANA
>         & NOT (CORRIDOR = 'JH' & MILE POST BETWEEN 567 AND 650))
>  OR (RETRIEVED STATIONS INFO.STATE = OKLAHOMA
>         & NOT (CORRIDOR = 'SW' & MILE POST BETWEEN 421 AND 472))
>  OR (RETRIEVED STATIONS INFO.STATE = TEXAS
>         & NOT ((CORRIDOR = 'SW' & MILE POST BETWEEN 482 AND 556)
>         OR RETRIEVED STATIONS INFO.CIRC7 = 'TP860')))
> & NOT ((CORRIDOR = 'MX' & MILE POST BETWEEN 499 AND 905)
>         OR (CORRIDOR = 'PB' & MILE POST BETWEEN 20 AND 62)
>         OR (CORRIDOR = 'M ' & MILE POST BETWEEN 10 AND 76))
> & STATION2.ROAD = BNSF
> & STATION2.STATE = COLORADO)
> THEN
>  CALL BUILD ROUTE('ATSF116', 'UP', 'DENVER', 'CO', 'BNSF', '', '',
>              '', '', '', '', '', '', '', '', '', '');
>
> Does JESS have the ability to handle complex AND, OR, NOT, and BETWEEN?
>
> Thanks,
>
> Morgan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
>
>


---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9214                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------






---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to