I think Eunice Palmeira wrote:

> (defquery search-result
>        (declare (variables ?X))
>        (Result  (ClassRecognized ?c&:(eq ?c ?X)))
>  )

Don't use function calls when you can use direct matching. It's more
efficient and much easier to read:

 (defquery search-result
        (declare (variables ?X))
        (Result  (ClassRecognized ?X)))
  )

> I need modify some values of slots of the specified facts, i don't know to
> get these values and the fact-id.

You're thinking too procedurally! Don't use a query and then iterate
over the results; just write a rule that matches the facts of
interest and modify them on the RHS:

(defrule modify-facts
  (modify-facts ?X)
  ?R <- (Result (ClassRecognized ?X))
  =>
  (modify ?R (whatever whatever)))

Then instead of using your "query-facts" function, just assert
"(modify-facts "Artificial")" and run the engine.



---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software 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