I think Donald Rich wrote:
> I am trying to port an existing CLIPS program for use with Jess.  When I
> try to run the program the code stops with an error message of
> "Unimplemented function".
> 

The error message should tell you the name of the function. The full
error trace should look like

Jess> (defrule rule-1 => (foo))
TRUE
Jess> (reset)
TRUE
Jess> (run)
Jess reported an error in routine Funcall.execute
        while executing (foo)
        while executing defrule MAIN::rule-1
        while executing (run).
  Message: Unimplemented function foo.
  Program text: ( run )  at line 3.
        at jess.Funcall.execute(Funcall.java:258)
        at jess.Defrule.fire(Defrule.java:220)
        (...  More deleted)

if the error occurred on a RHS, or like

Jess> (defrule rule-1 (bar ?x&:(foo)) => )
TRUE
Jess> (reset)
TRUE
Jess> (assert (bar 1))
Jess reported an error in routine Funcall.execute
        while executing (foo)
        while executing rule LHS (MTEQ)
        while executing rule LHS (MTELN)
        while executing rule LHS (TECT)
        while executing (assert (MAIN::bar 1)).
  Message: Unimplemented function foo.
  Program text: ( assert ( bar 1 ) )  at line 6.
        at jess.Funcall.execute(Funcall.java:258)
        at jess.FuncallValue.resolveValue(FuncallValue.java:33)
        at jess.Node1MTEQ.callNodeRight(Node1MTEQ.java:34)

if it was on a LHS.

If you're executing the program via your own Java main() routine,
rather than via jess.Main, then you might need to report more
information from the JessException object than you currently are.  Try
JessException.printStackTrace().

> 
>  
> 
> P.S.  I had to remove the type declarations for SYMBOL types.  It appear
> that Jess does not allow (slot id (type SYMBOL)).  Is this a known
> limitation?

Remember that the Jess language isn't the same as the CLIPS language,
and it's not intended to be. In section 2.7.2 of the manual, it says
that the "type" qualifier is parsed but ignored by Jess, and it lists
the allowed types. In Jess, symbols are called "atoms" for historical
reasons, so ATOM is used instead of SYMBOL.



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

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to