> 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
Well it depends on where the "object" comes from. I've got a bridge that lets
me evaluate ObjectiveC expressions using fact-ids and objects interchangably.
So I really seldom do (assert...), rather I'm more likely to do something like
([[SomeClass new] assert]). The assert method puts the object's self member (pointer)
into the self field as a symbol (turns it into an annotated Hex string).
If you aren't driving things from your programming language, you can use
gensym() to generate unique symbol ids like this:
(bind ?id (gensym))
(assert (Person (self ?id)...)))
>
|
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
/fontfamily>/x-tabstops>/x-para-attrib> |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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.
