|
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 firing rule that is:
(defrule identifier (declare (salience 5000)) (Element (id ?id) (type Identifier) (start ?index) (end ?index) (parts ?tokenId)) (Token (id ?tokenId) (type <IDENTIFIER>) (index ?index) (special $?specials) (value ?value)) => (assert (Abstract (id (gensym)) (type Identifier) (start ?index) (end ?index) (special $?specials) (parts ?value))) )
Other information from the watch output:
[Activation: MAIN::identifier f-424, f-425 ; time=851 ; salience=5000]
==> f-424 (MAIN::Element (id ast303) (type Identifier) (start 114) (end 114) (parts t114)) ==> f-425 (MAIN::Token (id t114) (type <IDENTIFIER>) (index 114) (special " ") (value "bSuccess"))
Results in:
FIRE 1 MAIN::identifier f-424, f-425 Unimplemented function ( run ) Unimplemented function
The only functions being called in the RHS are gensym and assert. Both work without changes in small test programs. I tested using both Jess60 and Jess61b2.
The deftemplates for the WMEs are:
(deftemplate Element "Element" (slot id) (slot type) (slot start (type INTEGER)) (slot end (type INTEGER)) (multislot parts) )
(deftemplate Token "Token" (slot id) (slot type (type LEXEME)) (slot index (type INTEGER)) (multislot special) (slot value (type STRING)) )
(deftemplate Abstract "Abstract element" (slot id) (slot type) (slot start (type INTEGER)) (slot end (type INTEGER)) (multislot special) (multislot parts) )
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?
Donald Rich
|
