[rules-users] Logical insert and cyclic rules dependences

zephyr ls262570 at students.mimuw.edu.pl
Tue Jul 3 07:45:06 EDT 2012


I think those junk facts are quite interesting from
psychological/anthropological perspective but as the project is more
AI/thinking database i guess it has to try to get as good conclusions as it
can rather than mimicking human errors :P

Im new to drools and some of those ideas seem really interesting. I didn't
know you can wrap logical insertions in some code that performs additional
check in fact memory (it could be the solution, or part of it) and they will
still work [i remember some tip about avoiding "if"s in RHS of rules].

Listening to logical retractions i also missed. 
(But i guess i could try to simulate it with "not Fact()" or sth)
[can you respond to rule that was active getting deactivated?]
(can you run some code after all was retracted and before drools looks for
new rules to fire; i think if i could store those additional ref cnt
increases somewhere, retract them when rule is not active anymore, and add
them if they stayed after retraction it would work as i want it to)

Facts are generally not mutable, only their state (true, false,
inconsistent) changes, and my current idea represents those states as
separate objects. [Maybe gluing them in one class and updating... but i
wanted to use logical insert for nice retraction properties {with no
cycles}, and they provide nice distinction on stated and inferred... i don't
see how to make that with "manual" insert and update]

So i guess this cycle problem is not that easy to solve and ill need to work
around it somehow.
Cycle detection is a bit of a problem as cycles may appear and disappear
when rules like
"a" and "b" -> c
may be part of cycle; and i think its more about finding parts of fact
memory not connected to inserted facts than actual cycles; cyclic
dependences are usually ok, the only problem is when they stop logical
retraction :(

--
View this message in context: http://drools.46999.n3.nabble.com/Logical-insert-and-cyclic-rules-dependences-tp4018381p4018427.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list