clara

http://www.clara-rules.org/
sparkofreason 2018-01-18T20:49:44.000377Z

I have a question about accumulation, which is going to span a couple of slack cells. The code and output above shows what I understand is the basic accumulation formalism, which is that the accumulated result acts like a fact. So when the (acc/all) above changes due to the (insert (->Num 3)) after the first fire-rules, the previously inserted Nums fact gets retracted, and a new one inserted.

sparkofreason 2018-01-18T20:51:02.000908Z

If I change the insert! in the collect-nums rule to be insert-unconditional!, then I get the output above, where nothing is ever retracted.

sparkofreason 2018-01-18T20:54:33.000821Z

The behavior I'd like to achieve is to have the output look like the above. This keeps the inserted facts resulting from an accumulator as long as the binding fact set remains valid. So after inserting (->Num 3), we still have the group coming from 1 and 2. But once I retract 2, those groups are retracted, and I'm only left with the group fact for those facts remaining in the rulebase. I'm pretty sure I could achieve this using my own custom rules with insert-unconditional! and retract!, but wonder if there's a way to have the TMS handle this without having to write explicit specialized rules.

zylox 2018-01-18T23:11:09.000296Z

so you essentially want a history as long as all members of that history are present

zylox 2018-01-18T23:12:26.000318Z

given how much the tms relies on present state alone that would be quite a doozy

sparkofreason 2018-01-18T23:20:15.000436Z

Yeah, digging around the code, I'm not sure it even makes sense with how rete works. It seems like it would require some modification.

sparkofreason 2018-01-18T23:21:36.000371Z

Seems similar to a join-node, but has to appear in a different place in the network or something.

zylox 2018-01-18T23:22:57.000049Z

you could envisions something like layered sessions that join their nodes (3d memory from a visulization point of view) and query "downward" but thats all a ton of work

zylox 2018-01-18T23:23:05.000432Z

but ya i agree....doesnt really mesh with rete imo