eclipse-viatra / org.eclipse.viatra

Main components of the VIATRA framework
https://eclipse.dev/viatra
Eclipse Public License 2.0
0 stars 1 forks source link

Selective query unloading (selective wipe) #166

Open bergmanngabor opened 2 months ago

bergmanngabor commented 2 months ago

Allow for a subset of patterns to be wiped from the Rete network to save some memory, but not lose all the work.

For instance, I may want to discard the matcher of the constraint pattern of a validation rule, plus helper patterns used in its definition, once I have obtained and processed its result; but I would like to keep the results any patterns from a collection of libraries that were initialized on demand when constructing these matchers, so that they can be reused when I evaluate the next validation rule.

Discrimination of patterns could happen arbitrarily, e.g. on the basis of their defining package.

bergmanngabor commented 2 months ago

Ideally, we we would manage to guarantee that:

can hold onto their references, unaware that a partial wipe happened. When re-requesting results though these handles, the appropriate parts of Rete could be reconstructed on demand.