Fork me on GitHub
#clara
<
2023-03-05
>
Dave Russell21:03:17

Hello! Is it possible to persist truth maintenance information across sessions? I have a use-case where I'd like to run a session, infer some new facts, and then possibly in the future load all facts from session 1 into another session and keep the truth maintenance functionality intact. Is this possible? 🙂

ethanc21:03:34

Sadly, i do not think that would work out. The memory of the original session would be lost after the facts were extracted from the session, and the new session wouldn’t be able to reconstruct that sort of history. That being said, perhaps Durability might interest you, if you are on the CLJ/Java side: http://www.clara-rules.org/docs/durability/ Instead of creating a second session, and trying to infer that memory from prior facts, just use the original session that has been serialized away.

wparker18:03:24

It does sound like it is possible durability might meet your needs even if not exactly what you described, as Ethan says it will basically serialise a session for use later. Do you envision the sessions before and after having all the same rules and queries?

Dave Russell20:03:35

Thanks! > Do you envision the sessions before and after having all the same rules and queries? Not quite 🙂 I'm trying to build some graph inference tooling, and I'd like to avoid loading large amounts of the graph in -- instead operating on a local subgraph at a time. So if I could have externalized some of the truth maintenance, I could (in theory) pull it back in at some point in the future (so long as the relevant facts are still present, of course) and leverage that. Sounds like that's a limitation -- no worries, thanks for the input!

mikerod15:03:51

You could try to model your problem with other fact types and use those to “bootstrap” sessions. I’m not clear enough on what you need overall there. My default answer though is to try to represent it as more facts.