hi everybody, dear todd:
 
i like the relational approach but:
 
how do you assign unique values for the slot 'self' ?
 
is there any mechanism supported directly by jess (factid ?)
or do you have some class that calculates the unique ids ?
this seems important to me e.g. when asserting facts
dynamically during inference process.
 
thanks
 
peter
 
-----Original Message-----
From: Todd Blanchard <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Monday, February 07, 2000 6:41 PM
Subject: Re: JESS: complex slots
..........
..........

Anyhow, it helps to think like a relational database designer.
Using objects, your template might look something like:


(deftemplate Person
(field self)
(field name)
(field organization)) ; relates to an Organization

(deftemplate Organization
(field self)
(field name)
(field location))

You then write rules that look like relational database queries.
For instance, to get a Person's Organization you might do something like....

(defrule person-organization
(Person (organization ?org) ....)
(Organization (self ?org) .....)
=>
...)

It sounds like JESS has a way to store a Java object reference in a field,
which does roughly the same thing as the self field I put into every object.

Hope this helps.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
eTranslate, Inc. The Power of Language
Todd Blanchard main +1.415.970.7119
Chief Technology Architect fax +1.415.371.0008
http://www.etranslate.com/
500 Treat Street, Suite 100, San Francisco, California 94110, U.S.A.

Reply via email to