Powerloom beginner questions...

Srini Ram <[email protected]> Mon, 28 Jan 2008 09:45:54 -0800 (PST)
Newsgroups gmane.comp.ai.powerloom
Message-ID <[email protected]>
It seems that there are three ways of writing
functions:
1. Powerloom deffunction 
2. Stella function
3. Lisp function

I understand that stella code can call lisp via
verbatim, but:
a. how does powerloom function call a stella
function. 
b. When do I write a PL (def)function as opposed to a
Stella (or LISP) function (defun). 
c. Can PL facts/queries/rules only see PL functions? 

This does not work for example:

;; I guess I am calling STELLA defun and not CL::defun
;; below. If I wanted to define a LISP function, would
;; I just say (verbatim (:common-lisp (CL:defun... ?
(defun sl-age-fn ((age INTEGER))
    (return (* 2 age))
)

;; all persons are aged 20
(defrule age-rule 
  (=> (Person ?x )
     (age ?x (sl-age-fn 10))))

..This gives unknown sl-age-fn when evaluated.
 
Thanks 
Srini





      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs