le jeu 23-05-2002 � 04:25, [EMAIL PROTECTED] a �crit :
> I think Candide Kemmler wrote:
>
> >
> > - JESS/Fact Storage Provider Framework: looks very interesting indeed;
> > only it's not much talked about; seems nobody's ever tested it with the
> > DBMS's _I_ use: PostgreSQL and MySQL, if ever tested _at all_; Does it
> > help to reduce the memory consumption of JESS ? If it does, why isn't it
> > considered a VERY interesting piece of software, I mean it should be put
> > on the homepage of JESS.
>
> It -is- a very interesting piece of software. Having been written with
> JDBC, it theoretically works with any RDBMS; if it doesn't, it's
> fairly small so should be easy to modify. For certain kinds of
> problems, yes, it can vastly reduce the amount of memory Jess would
> need.
I've decided to do my best to make it work.
Until now, I've managed to delete facts, and to partially write a new
one. To achieve the first part, I had to add the following at the
beginning of the getEntityName (...) methods in FactStorageManager:
int i = 0;
if ( (i=factName.indexOf ( "::" )) != -1 )
factName = factName.substring ( i+2 );
Indeed I have noticed that the entity name, "scott-dept" was prepended
by "Main::", which made the system complain with some lame remarks :-)
This is bad, very bad hacking, but it did the trick. I realize, however,
that this shouldn't have happened in the first place. Any clues ?
Now, for the partial fact assertion, this is what I've managed to pour
into the database:
mysql> select * from emp;
+-------+---------+------+------+----------+------+------+--------+
| EMPNO | ENAME | JOB | MGR | HIREDATE | SAL | COMM | DEPTNO |
+-------+---------+------+------+----------+------+------+--------+
| 1 | Ziegler | NULL | NULL | NULL | NULL | NULL | 1 |
+-------+---------+------+------+----------+------+------+--------+
1 row in set (0.00 sec)
But before that, I get the following from jess:
Jess reported an error in routine Value.factValue
while executing (fsm-assert (assert (Main::scott-emp (empno 1) (ename
"Ziegler") (deptno 1)))).
Message: Not a fact: "FALSE" (type = ATOM).
Program text: ( fsm-assert ( assert ( scott-emp (empno 1 ) ( ename
"Ziegler" ) ( deptno 1 ) ) ) )
at jess.Value.a(Unknown Source)
at jess.Value.a(Unknown Source)
at jess.Value.factValue(Unknown Source)
at jess.FuncallValue.factValue(Unknown Source)
at
jessx.ProviderFunctions$FactWriterFunction.call(ProviderFunctions.java:286)
at jess.ef.a(Unknown Source)
....
Notice again the prepended "Main::" before scott-emp...
I'll keep on investigating on all this, but if the more experienced ones
could enlighten me a bit, again, I would be very grateful.
Oh, and I wanted to know: I didn't figure out yet how to recall some
previous state that would be recorded in the database. For example in
the case of a crash recovery.
Has anybody ever thought of writing more Providers JOTS-style, like an
EJB provider or a XMLdb provider ? Just curious...
One more, last question: I've read somewhere that relational databases
were only smart enough to deal with existence and conjunction, which was
why rule-based systems, or prolog for that matter, were really smarter
than SQL. Now is it so that with the "Facts Storage Framework" a
generalization to all logical operators is achieved for data retrieval ?
I mean: the kind of stuff on which the Aditi people are working on ???
candide
--------------------------------------------------------------------
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]
--------------------------------------------------------------------